src/Builder4/DialogPluginWebkit.bjs
authorAlan Knowles <alan@roojs.com>
Thu, 16 Apr 2015 09:51:26 +0000 (17:51 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 16 Apr 2015 09:51:26 +0000 (17:51 +0800)
src/Builder4/DialogPluginWebkit.vala

src/Builder4/DialogPluginWebkit.bjs
src/Builder4/DialogPluginWebkit.vala

index 36251bf..7ff0687 100644 (file)
@@ -39,7 +39,7 @@
           "script_dialog" : " (dialog) => {\n    if (this.el == null) {\n        return true;\n    }\n    \n     var msg = dialog.get_message();\n     if (msg.length < 4) {\n        return false;\n     }\n     if (msg.substring(0,4) != \"IPC:\") {\n         return false;\n     }\n     var ar = msg.split(\":\", 3);\n    if (ar.length < 3) {\n        return false;\n    }\n    print(\"CMD: %s\\n\",ar[1]);\n        print(\"ARGS: %s\\n\",ar[2]);\n    switch(ar[1]) {\n        case \"SAVEHTML\":\n          print(\"%sw\",ar[2]);\n          //  _this.file.saveHTML(ar[2]);\n            return true;\n        default:\n            return false;\n    }\n    \n}"
          },
          "id" : "webview",
-         "* init" : " {\n    // this may not work!?\n    var settings =  this.el.get_settings();\n    \n     \n    var fs= new FakeServer(this.el);\n    fs.ref();\n    // this was an attempt to change the url perms.. did not work..\n    // settings.enable_file_access_from_file_uris = true;\n    // settings.enable_offline_web_application_cache - true;\n    // settings.enable_universal_access_from_file_uris = true;\n   \n     \n    \n    \n    \n\n     // FIXME - base url of script..\n     // we need it so some of the database features work.\n    this.el.load_html( \"Render not ready\" , \n            //fixme - should be a config option!\n            // or should we catch stuff and fix it up..\n            \"xhttp://localhost/app.Builder/\"\n    );\n        \n        \n    \n    \n}\n",
+         "* init" : " {\n    // this may not work!?\n    var settings =  this.el.get_settings();\n    settings.enable_write_console_messages_to_stdout = true;\n     \n    var fs= new FakeServer(this.el);\n    fs.ref();\n    // this was an attempt to change the url perms.. did not work..\n    // settings.enable_file_access_from_file_uris = true;\n    // settings.enable_offline_web_application_cache - true;\n    // settings.enable_universal_access_from_file_uris = true;\n   \n     \n    \n    \n    \n\n     // FIXME - base url of script..\n     // we need it so some of the database features work.\n    this.el.load_html( \"Render not ready\" , \n            //fixme - should be a config option!\n            // or should we catch stuff and fix it up..\n            \"xhttp://localhost/app.Builder/\"\n    );\n        \n        \n    \n    \n}\n",
          "xtype" : "WebView",
          "* pack" : "add",
          "$ xns" : "WebKit"
index 0a9ee6f..b0e1a04 100644 (file)
@@ -230,7 +230,7 @@ public class Xcls_DialogPluginWebkit : Object
             {
                 // this may not work!?
                 var settings =  this.el.get_settings();
-                
+                settings.enable_write_console_messages_to_stdout = true;
                  
                 var fs= new FakeServer(this.el);
                 fs.ref();