parent.putPrivately("$" + id, b, parentNodeName);
}
- if (script != null) {
+ if (script != null || (redirect != null && !"self".equals(redirect))) {
pboxes.addElement(b);
ptemplates.addElement(nodeName);
}
Scriptable s = Static.getStatic(nodeName);
if (staticscript != null) {
Script temp = staticscript;
+ ((InterpretedScript)temp).setParentScope(s); // so we know how to handle Static.get("xwt")
staticscript = null;
temp.exec(Context.enter(), s);
}