Package org.htmlunit.javascript.polyfill
Class Polyfill
java.lang.Object
org.htmlunit.javascript.polyfill.Polyfill
Support to use polyfills for js features not implemented so far
(idea from Colin Alworth).
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
apply
(org.htmlunit.corejs.javascript.Context context, org.htmlunit.corejs.javascript.Scriptable scriptable) Compile the script if needed and exec to setup the context.static Polyfill
private static Polyfill
getPolyfill
(String resouceName)
-
Field Details
-
CACHE
-
url_
-
source_
-
script_
private org.htmlunit.corejs.javascript.Script script_
-
-
Constructor Details
-
Polyfill
public Polyfill()
-
-
Method Details
-
getFetchPolyfill
- Throws:
IOException
-
getPolyfill
- Throws:
IOException
-
apply
public void apply(org.htmlunit.corejs.javascript.Context context, org.htmlunit.corejs.javascript.Scriptable scriptable) Compile the script if needed and exec to setup the context.- Parameters:
context
- the contextscriptable
- the scriptable
-