Examples of associateValue()


Examples of com.gargoylesoftware.htmlunit.javascript.host.Window.associateValue()

        // eval hack (cf unit tests testEvalScopeOtherWindow and testEvalScopeLocal)
        final Class< ? >[] evalFnTypes = {String.class};
        final Member evalFn = Window.class.getMethod("custom_eval", evalFnTypes);
        final FunctionObject jsCustomEval = new FunctionObject("eval", evalFn, window);
        window.associateValue("custom_eval", jsCustomEval);

        for (final String jsClassName : jsConfig.keySet()) {
            final ClassConfiguration config = jsConfig.getClassConfiguration(jsClassName);
            final Method jsConstructor = config.getJsConstructor();
            if (jsConstructor != null) {
View Full Code Here

Examples of org.mozilla.javascript.ScriptableObject.associateValue()

            if (log.isDebugEnabled()) {
                log.debug("Compiling code from {}", fileName);
            }

            ScriptableObject ret = (ScriptableObject)cx.newObject(thisObj);
            ret.associateValue(FILE_NAME_KEY, fileName);

            Script compiled = getCompiledScript(cx, code, fileName);
            if (compiled == null) {
                // Compilation failed, probably because the script is too large
                ret.associateValue(SOURCE_KEY, code);
View Full Code Here

Examples of org.mozilla.javascript.ScriptableObject.associateValue()

            ret.associateValue(FILE_NAME_KEY, fileName);

            Script compiled = getCompiledScript(cx, code, fileName);
            if (compiled == null) {
                // Compilation failed, probably because the script is too large
                ret.associateValue(SOURCE_KEY, code);
            } else {
                ret.associateValue(CODE_KEY, compiled);
            }
            return ret;
        }
View Full Code Here

Examples of org.mozilla.javascript.ScriptableObject.associateValue()

            Script compiled = getCompiledScript(cx, code, fileName);
            if (compiled == null) {
                // Compilation failed, probably because the script is too large
                ret.associateValue(SOURCE_KEY, code);
            } else {
                ret.associateValue(CODE_KEY, compiled);
            }
            return ret;
        }

        /**
 
View Full Code Here

Examples of org.mozilla.javascript.ScriptableObject.associateValue()

                Err errs = new Err();
                self.transFactory.setErrorListener(errs);
                Templates tmpl = self.transFactory.newTemplates(src);

                ScriptableObject ret = (ScriptableObject)cx.newObject(thisObj);
                ret.associateValue("template", tmpl);
                return ret;

            } catch (TransformerConfigurationException e) {
                throw Utils.makeError(cx, thisObj, "XSLT transformer exception: " + e);
            }
View Full Code Here

Examples of org.mozilla.javascript.ScriptableObject.associateValue()

            ensureArg(args, 0);
            XmlWrapImpl self = (XmlWrapImpl)thisObj;

            Source src = self.getSource(cx, args[0]);
            ScriptableObject ret = (ScriptableObject)cx.newObject(thisObj);
            ret.associateValue("document", src);
            return ret;
        }

        @JSFunction
        @SuppressWarnings("unused")
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.