Class JsResources
- java.lang.Object
-
- de.knightsoftnet.mtwidgets.client.ui.widget.resourceloader.JsResources
-
public class JsResources extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected static Map<String,List<elemental2.dom.EventListener>>eventLisenerQueueprotected static Map<String,Boolean>initializationStartedprotected static Map<String,elemental2.dom.Event>rememberEventprotected static StringSCRIPT_TYPEprotected static StringTAG_TYPE
-
Constructor Summary
Constructors Constructor Description JsResources()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisInHeader(String scriptname)check if script is already in the header.static booleanisInitialized(String scriptname)check if script is available and initialized.static voidwhenReady(String scriptname, elemental2.dom.EventListener function)async load of resources.
-
-
-
Field Detail
-
TAG_TYPE
protected static final String TAG_TYPE
- See Also:
- Constant Field Values
-
SCRIPT_TYPE
protected static final String SCRIPT_TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
whenReady
public static void whenReady(String scriptname, elemental2.dom.EventListener function)
async load of resources.- Parameters:
function- function to call on load
-
isInitialized
public static boolean isInitialized(String scriptname)
check if script is available and initialized.- Returns:
- true if it exists
-
isInHeader
public static boolean isInHeader(String scriptname)
check if script is already in the header.- Returns:
- true if it exists
-
-