Changed all property & signal names to lowerCamelCase
[platform/core/uifw/dali-toolkit.git] / plugins / dali-script-v8 / src / module-loader / module-loader.cpp
index d475c90..6623374 100644 (file)
@@ -29,7 +29,6 @@ namespace V8Plugin
 
 ModuleLoader::ModuleLoader()
 {
-
 }
 
 ModuleLoader::~ModuleLoader()
@@ -106,7 +105,7 @@ bool ModuleLoader::ExecuteScriptFromFile( v8::Isolate* isolate,
 }
 
 /**
- * ### var module = require("module-name");
+ * ### var module = require("moduleName");
  *
  *
  * There is no standard for modules or the 'require' keyword in JavaScript.<br />
@@ -162,7 +161,7 @@ bool ModuleLoader::ExecuteScriptFromFile( v8::Isolate* isolate,
  * from an object literal with name-value pairs (exports object) to a function.
  *
  *     // my_first_module.js
- *     module.exports = function() {  log("hello-world"); }
+ *     module.exports = function() {  log("helloWorld"); }
  *
  * <br />
  *
@@ -311,9 +310,7 @@ bool ModuleLoader::ExecuteScriptFromFile( v8::Isolate* isolate,
  * @for ModuleLoader
  *
  */
-void ModuleLoader::Require(const v8::FunctionCallbackInfo< v8::Value >& args,
-
-                           v8::Persistent<v8::ObjectTemplate>& globalObjectTemplate )
+void ModuleLoader::Require(const v8::FunctionCallbackInfo< v8::Value >& args )
 {
   v8::Isolate* isolate = args.GetIsolate();
   v8::HandleScope handleScope( isolate );
@@ -393,6 +390,12 @@ void ModuleLoader::Require(const v8::FunctionCallbackInfo< v8::Value >& args,
   args.GetReturnValue().Set( moduleExports );
 
 }
+
+void ModuleLoader::StorePreBuiltModule( v8::Isolate* isolate, v8::Local<v8::Object>& exportObject, const std::string& name )
+{
+  StoreModule( "", name, name, isolate, exportObject );
+}
+
 void ModuleLoader::StoreScriptInfo( const std::string& sourceFileName )
 {
   V8Utils::GetFileDirectory( sourceFileName, mCurrentScriptPath);