Interface AssembledResources
public interface AssembledResources
Interface for clients to include web resources that have been required via
RequiredResources.- Since:
- v3.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionCalculates dependencies, returns requested resources, then clears the list of webresources + contexts that have been included since the last call todrainIncludedResources().default WebResourceSetDeprecated.since 5.6.0.peek()Returns the currently requested resources as perdrainIncludedResources(), however does not clear the internal list.
-
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 todrainIncludedResources().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:
-
From earliest
ResourcePhaseto latest. -
From highest priority resource to lowest.
In case of equal priorities, the earliest call to
RequiredResourceswins. - (If superbatch is enabled) renders the superbatch context.
- Renders all required contexts.
- Renders all required web-resources.
- Returns:
- list of plugin resources to emit.
-
From earliest
-
peek
WebResourceSet peek()Returns the currently requested resources as perdrainIncludedResources(), 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.since 5.6.0. Unused nowResourcePhase.INLINEexists.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
-