Module org.htmlunit
Class AbstractJavaScriptConfiguration
java.lang.Object
org.htmlunit.javascript.configuration.AbstractJavaScriptConfiguration
- Direct Known Subclasses:
JavaScriptConfiguration,ProxyAutoConfigJavaScriptConfiguration,WorkerJavaScriptConfiguration
An abstract container for all the JavaScript configuration information.
- Author:
- Mike Bowler, Chris Erskine, Ahmed Ashour, Ronald Brill, Frank Danek
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractJavaScriptConfiguration(BrowserVersion browser, Class<?> globalThisClass) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetAll()Gets all the configurations.static ClassConfigurationgetClassConfiguration(Class<? extends HtmlUnitScriptable> klass, BrowserVersion browserVersion) Returns the class configuration of the givenklass.protected abstract Class<? extends HtmlUnitScriptable>[]Class<? extends HtmlUnitScriptable>getDomJavaScriptMappingFor(Class<?> clazz) Returns an immutable map containing the DOM to JavaScript mappings.protected ClassConfiguration
-
Constructor Details
-
AbstractJavaScriptConfiguration
Constructor.- Parameters:
browser- the browser version to useglobalThisClass- the globalThis class for faster access
-
-
Method Details
-
getClasses
- Returns:
- the classes configured by this configuration
-
getAll
Gets all the configurations.- Returns:
- the class configurations
-
getClassConfiguration
public static ClassConfiguration getClassConfiguration(Class<? extends HtmlUnitScriptable> klass, BrowserVersion browserVersion) Returns the class configuration of the givenklass.- Parameters:
klass- the classbrowserVersion- the browser version- Returns:
- the class configuration
-
getDomJavaScriptMappingFor
Returns an immutable map containing the DOM to JavaScript mappings. Keys are java classes for the various DOM classes (e.g. HtmlInput.class) and the values are the JavaScript class names (e.g. "HTMLAnchorElement").- Parameters:
clazz- the class to get the scriptable for- Returns:
- the mappings
-
getGlobalThisConfiguration
-