public JavaScriptImplementation load(XMLStreamReader reader, LoaderContext loaderContext) throws XMLStreamException, ConfigurationLoadException {
String scriptFile = reader.getAttributeValue(null, "scriptFile");
String script = loadScript(scriptFile, loaderContext.getResourceLoader());
ComponentType componentType = loadComponentType(scriptFile, loaderContext);
JavaScriptImplementation jsImpl = new JavaScriptImplementation();
jsImpl.setComponentType(componentType);
jsImpl.setScriptFile(scriptFile);
jsImpl.setScript(script);
jsImpl.setResourceLoader(loaderContext.getResourceLoader());
jsImpl.setTypeHelper(registry.getContext().getTypeHelper());
return jsImpl;
}