public class PartialMarkupDocumentLinker extends Object implements DocumentLinker
Constructor and Description |
---|
PartialMarkupDocumentLinker() |
Modifier and Type | Method and Description |
---|---|
void |
addCoreLibrary(String libraryURL)
A special case used only for the libraries that are part of the core stack, which itself contains RequireJS
and is used to bootstrap up to adding non-core libraries.
|
void |
addInitialization(InitializationPriority priority,
String moduleName,
String functionName,
JSONArray arguments)
Adds initialization, based on invoking functions exported by JavaScript modules.
|
void |
addLibrary(String libraryURL)
Adds a link to load a non-core JavaScript library.
|
void |
addModuleConfigurationCallback(ModuleConfigurationCallback callback)
Adds a module configuration callback for this request.
|
void |
addScript(InitializationPriority priority,
String script)
Adds JavaScript code.
|
void |
addStylesheetLink(StylesheetLink stylesheet)
Adds a link to load a CSS stylesheet.
|
void |
commit(JSONObject reply)
Commits changes, adding one or more keys to the reply.
|
public PartialMarkupDocumentLinker()
public void addCoreLibrary(String libraryURL)
DocumentLinker
addCoreLibrary
in interface DocumentLinker
public void addLibrary(String libraryURL)
DocumentLinker
addLibrary
in interface DocumentLinker
public void addStylesheetLink(StylesheetLink stylesheet)
DocumentLinker
addStylesheetLink
in interface DocumentLinker
public void addScript(InitializationPriority priority, String script)
DocumentLinker
addScript
in interface DocumentLinker
priority
- when to execute the provided scriptscript
- statement to add to the block (a newline will be appended as well)public void addModuleConfigurationCallback(ModuleConfigurationCallback callback)
DocumentLinker
addModuleConfigurationCallback
in interface DocumentLinker
callback
- a ModuleConfigurationCallback
. It cannot be null.public void addInitialization(InitializationPriority priority, String moduleName, String functionName, JSONArray arguments)
DocumentLinker
addInitialization
in interface DocumentLinker
priority
- priority at which to perform initializationmoduleName
- name of module; the module exports a single function, or a map of functionsfunctionName
- name of function exported by module, or null (if the module exports a single function)arguments
- arguments to pass to the function, or null if no argumentspublic void commit(JSONObject reply)
reply
- JSON Object to be sent to client5.6.3 - Copyright © 2003-2021 The Apache Software Foundation.