Interface AssembledResources


public interface AssembledResources
Interface for clients to include web resources that have been required via RequiredResources.
Since:
v3.0
See Also:
  • Method Details

    • drainIncludedResources

      WebResourceSet drainIncludedResources()
      Calculates dependencies, returns requested resources, then clears the list of webresources + contexts that have been included since the last call to drainIncludedResources().

      This method ensures that no individual webresource will be emitted twice, either as part of a superbatch, context batch or individual include.

      Resources are ordered in the following way:

      1. From earliest ResourcePhase to latest.
      2. From highest priority resource to lowest. In case of equal priorities, the earliest call to RequiredResources wins.
      3. (If superbatch is enabled) renders the superbatch context.
      4. Renders all required contexts.
      5. Renders all required web-resources.
      Returns:
      list of plugin resources to emit.
    • peek

      Returns the currently requested resources as per drainIncludedResources(), however does not clear the internal list. Intended to be used to debugging or introspecting the current state. This does not block on any promises, and importantly does not return any undrained complete promises.
    • drainIncludedSyncResources

      @Deprecated default WebResourceSet drainIncludedSyncResources()
      Deprecated.
      since 5.6.0. Unused now ResourcePhase.INLINE exists.
      Calculates dependencies, returns requested resources, then clears the list of webresources + context for the resources that should be written at the top of the page.
      Returns:
      List of plugin resources to emit.
      Since:
      5.0.0