String jsText = DomHelper.getElementText(element);
String sourceName = DomHelper.getSystemIdLocation(element);
Context ctx = Context.enter();
Script script = ctx.compileReader(
JavaScriptWidgetListener.getRootScope(), //scope
new StringReader(jsText), // in
sourceName == null ? "<unknown>" : sourceName, // sourceName
DomHelper.getLineLocation(element), // lineNo
null // securityDomain