/** * get the Window * @return the window */ public DomWindow getWindow() { // if there is now window yet if (_window == null) { // create a window for this document _window = new DomWindow( this ); setParentScope( _window ); } return _window; }
/** * initialize JavaScript for the given ScriptEngine * @parent - the Script Engine to use * @scriptable - the scriptable object to do the initialization for */ void initialize( JavaScriptEngine parent, ScriptableDelegate scriptable ) throws SAXException, PropertyException, JavaScriptException, NotAFunctionException { _scriptable = scriptable; _scriptable.setScriptEngine( this ); _parent = parent; if (parent != null) setParentScope( parent ); }
/** * initialize the name space * @param owner * @param namespaceURI * @param qualifiedName */ protected void initialize( DocumentImpl owner, String namespaceURI, String qualifiedName ) { initialize( owner ); _tagName = qualifiedName; _namespaceUri = namespaceURI; if (qualifiedName.indexOf(':') < 0) { _localName = qualifiedName; } else { _localName = qualifiedName.substring( qualifiedName.indexOf(':') + 1 ); } setParentScope(owner); }
protected ScriptableObject createLocalScope(Context context) { ScriptableObject scope = (ScriptableObject) context.newObject(globalScope); scope.setPrototype(null); scope.setParentScope(globalScope); return scope; }
public static void setBuiltinProtoAndParent(ScriptableObject object, Scriptable scope, TopLevel.Builtins type) { scope = ScriptableObject.getTopLevelScope(scope); object.setParentScope(scope); object.setPrototype(TopLevel.getBuiltinPrototype(scope, type)); }
public static void setBuiltinProtoAndParent(ScriptableObject object, Scriptable scope, TopLevel.Builtins type) { scope = ScriptableObject.getTopLevelScope(scope); object.setParentScope(scope); object.setPrototype(TopLevel.getBuiltinPrototype(scope, type)); }
public static void setBuiltinProtoAndParent(ScriptableObject object, Scriptable scope, TopLevel.Builtins type) { scope = ScriptableObject.getTopLevelScope(scope); object.setParentScope(scope); object.setPrototype(TopLevel.getBuiltinPrototype(scope, type)); }
public static void setBuiltinProtoAndParent(ScriptableObject object, Scriptable scope, TopLevel.Builtins type) { scope = ScriptableObject.getTopLevelScope(scope); object.setParentScope(scope); object.setPrototype(TopLevel.getBuiltinPrototype(scope, type)); }
public static void setObjectProtoAndParent(ScriptableObject object, Scriptable scope) { // Compared with function it always sets the scope to top scope scope = ScriptableObject.getTopLevelScope(scope); object.setParentScope(scope); Scriptable proto = ScriptableObject.getClassPrototype(scope, object.getClassName()); object.setPrototype(proto); }
public static void setObjectProtoAndParent(ScriptableObject object, Scriptable scope) { // Compared with function it always sets the scope to top scope scope = ScriptableObject.getTopLevelScope(scope); object.setParentScope(scope); Scriptable proto = ScriptableObject.getClassPrototype(scope, object.getClassName()); object.setPrototype(proto); }
public static void setObjectProtoAndParent(ScriptableObject object, Scriptable scope) { // Compared with function it always sets the scope to top scope scope = ScriptableObject.getTopLevelScope(scope); object.setParentScope(scope); Scriptable proto = ScriptableObject.getClassPrototype(scope, object.getClassName()); object.setPrototype(proto); }
/** * * @return the onload event */ public Function getOnloadEvent() { if (getParentScope() == null && getOwnerDocument() instanceof Scriptable) setParentScope( (Scriptable) getOwnerDocument() ); return _onLoad.getHandler(); }
public static void setObjectProtoAndParent(ScriptableObject object, Scriptable scope) { // Compared with function it always sets the scope to top scope scope = ScriptableObject.getTopLevelScope(scope); object.setParentScope(scope); Scriptable proto = ScriptableObject.getClassPrototype(scope, object.getClassName()); object.setPrototype(proto); }
public static void setObjectProtoAndParent(ScriptableObject object, Scriptable scope) { // Compared with function it always sets the scope to top scope scope = ScriptableObject.getTopLevelScope(scope); object.setParentScope(scope); Scriptable proto = ScriptableObject.getClassPrototype(scope, object.getClassName()); object.setPrototype(proto); }
public static void setObjectProtoAndParent(ScriptableObject object, Scriptable scope) { // Compared with function it always sets the scope to top scope scope = ScriptableObject.getTopLevelScope(scope); object.setParentScope(scope); Scriptable proto = ScriptableObject.getClassPrototype(scope, object.getClassName()); object.setPrototype(proto); }
pageScope.setParentScope(parent); if (variables != null) { RhinoUtil.enter();
wrapper.setParentScope(scope); wrapper.setPrototype(ScriptableObject.getObjectPrototype(scope)); wrapper.defineProperty("", value, 0);
wrapper.setParentScope(scope); wrapper.setPrototype(ScriptableObject.getObjectPrototype(scope)); wrapper.defineProperty("", value, 0);
compileScope.setParentScope(null); compileScope.setPrototype(scope);
private ScriptableObject getScope() { // Create a scope for the value conversion. This scope will be an empty scope exposing basic Object and Function, sufficient for value-conversion. // In case no context is active for the current thread, we can safely enter end exit one to get hold of a scope ScriptableObject scope; Context ctx = Context.getCurrentContext(); boolean closeContext = false; if (ctx == null) { ctx = Context.enter(); closeContext = true; } scope = ctx.initStandardObjects(); scope.setParentScope(null); if (closeContext) { Context.exit(); } return scope; }