get more of the console working
diff --git a/weinre.web/modules/weinre/target/InjectedScriptHostImpl.scoop b/weinre.web/modules/weinre/target/InjectedScriptHostImpl.scoop
index 85d82ec..9fa2cc7 100644
--- a/weinre.web/modules/weinre/target/InjectedScriptHostImpl.scoop
+++ b/weinre.web/modules/weinre/target/InjectedScriptHostImpl.scoop
@@ -9,82 +9,64 @@
require ../common/Weinre
//-----------------------------------------------------------------------------
-//
-//-----------------------------------------------------------------------------
class InjectedScriptHostImpl
//-----------------------------------------------------------------------------
-//
-//-----------------------------------------------------------------------------
method clearConsoleMessages(callback)
// callback: function()
Weinre.notImplemented(arguments.callee.signature)
//-----------------------------------------------------------------------------
-//
-//-----------------------------------------------------------------------------
method copyText(/*string*/ text, callback)
// callback: function()
Weinre.notImplemented(arguments.callee.signature)
//-----------------------------------------------------------------------------
-//
-//-----------------------------------------------------------------------------
method nodeForId(/*int*/ nodeId, callback)
return Weinre.nodeStore.getNode(nodeId)
//-----------------------------------------------------------------------------
-//
-//-----------------------------------------------------------------------------
method pushNodePathToFrontend(/*any*/ node, /*boolean*/ withChildren, /*boolean*/ selectInUI, callback)
// callback: function()
Weinre.notImplemented(arguments.callee.signature)
//-----------------------------------------------------------------------------
-//
-//-----------------------------------------------------------------------------
method inspectedNode(/*int*/ num, callback)
// callback: function()
Weinre.notImplemented(arguments.callee.signature)
//-----------------------------------------------------------------------------
-//
-//-----------------------------------------------------------------------------
method currentCallFrame(callback)
// callback: function()
Weinre.notImplemented(arguments.callee.signature)
//-----------------------------------------------------------------------------
-//
-//-----------------------------------------------------------------------------
method selectDatabase(/*any*/ database, callback)
// callback: function()
Weinre.notImplemented(arguments.callee.signature)
//-----------------------------------------------------------------------------
-//
-//-----------------------------------------------------------------------------
method selectDOMStorage(/*any*/ storage, callback)
// callback: function()
Weinre.notImplemented(arguments.callee.signature)
//-----------------------------------------------------------------------------
-//
-//-----------------------------------------------------------------------------
method didCreateWorker(/*int*/ id, /*string*/ url, /*boolean*/ isFakeWorker, callback)
// callback: function()
Weinre.notImplemented(arguments.callee.signature)
//-----------------------------------------------------------------------------
-//
-//-----------------------------------------------------------------------------
method didDestroyWorker(/*int*/ id, callback)
// callback: function()
Weinre.notImplemented(arguments.callee.signature)
//-----------------------------------------------------------------------------
-//
-//-----------------------------------------------------------------------------
method nextWorkerId(callback)
// callback: function()
Weinre.notImplemented(arguments.callee.signature)
+
+//-----------------------------------------------------------------------------
+method internalConstructorName(object)
+ var ctor = object.constructor
+
+ return ctor.fullClassName || ctor.displayName || ctor.name || "Object"
\ No newline at end of file
diff --git a/weinre.web/modules/weinre/target/WiConsoleImpl.scoop b/weinre.web/modules/weinre/target/WiConsoleImpl.scoop
index 447b959..9964c5a 100644
--- a/weinre.web/modules/weinre/target/WiConsoleImpl.scoop
+++ b/weinre.web/modules/weinre/target/WiConsoleImpl.scoop
@@ -23,11 +23,12 @@
//-----------------------------------------------------------------------------
method clearConsoleMessages(callback)
+ Weinre.wi.ConsoleNotify.consoleMessagesCleared()
+
if (callback) {
Weinre.WeinreTargetCommands.sendClientCallback(callback, [])
}
-
//-----------------------------------------------------------------------------
method setMonitoringXHREnabled(/*boolean*/ enabled, callback)
if (callback) {
diff --git a/weinre.web/modules/weinre/target/WiRuntimeImpl.scoop b/weinre.web/modules/weinre/target/WiRuntimeImpl.scoop
index ffa2439..cf7c4b5 100644
--- a/weinre.web/modules/weinre/target/WiRuntimeImpl.scoop
+++ b/weinre.web/modules/weinre/target/WiRuntimeImpl.scoop
@@ -13,29 +13,43 @@
//-----------------------------------------------------------------------------
method evaluate(/*string*/ expression, /*string*/ objectGroup, /*boolean*/ includeCommandLineAPI, callback)
- // callback: function(/*any*/ result)
- Weinre.notImplemented(arguments.callee.signature)
-
+ var result = Weinre.injectedScript.evaluate(expression, objectGroup, includeCommandLineAPI)
+
+ if (callback) {
+ Weinre.WeinreTargetCommands.sendClientCallback(callback, [result])
+ }
//-----------------------------------------------------------------------------
method getCompletions(/*string*/ expression, /*boolean*/ includeCommandLineAPI, callback)
- // callback: function(/*any*/ result)
- Weinre.notImplemented(arguments.callee.signature)
+ var result = Weinre.injectedScript.getCompletions(expression, includeCommandLineAPI)
+ if (callback) {
+ Weinre.WeinreTargetCommands.sendClientCallback(callback, [result])
+ }
//-----------------------------------------------------------------------------
method getProperties(/*any*/ objectId, /*boolean*/ ignoreHasOwnProperty, /*boolean*/ abbreviate, callback)
- // callback: function(/*any*/ result)
- Weinre.notImplemented(arguments.callee.signature)
+ var objectId = JSON.stringify(objectId)
+ var result = Weinre.injectedScript.getProperties(objectId, ignoreHasOwnProperty, abbreviate)
+ if (callback) {
+ Weinre.WeinreTargetCommands.sendClientCallback(callback, [result])
+ }
//-----------------------------------------------------------------------------
method setPropertyValue(/*any*/ objectId, /*string*/ propertyName, /*string*/ expression, callback)
- // callback: function(/*any*/ result)
- Weinre.notImplemented(arguments.callee.signature)
+ var objectId = JSON.stringify(objectId)
+ var result = Weinre.injectedScript.setPropertyValue(objectId, propertyName, expression)
+ if (callback) {
+ Weinre.WeinreTargetCommands.sendClientCallback(callback, [result])
+ }
//-----------------------------------------------------------------------------
method releaseWrapperObjectGroup(/*int*/ injectedScriptId, /*string*/ objectGroup, callback)
- // callback: function()
- Weinre.notImplemented(arguments.callee.signature)
\ No newline at end of file
+ var result = Weinre.injectedScript.releaseWrapperObjectGroup(objectGroupName)
+
+ if (callback) {
+ Weinre.WeinreTargetCommands.sendClientCallback(callback, [result])
+ }
+
\ No newline at end of file