incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmue...@apache.org
Subject [22/27] closes #35
Date Tue, 03 Jan 2012 18:39:31 GMT
http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/9f1c7663/weinre.web/modules/weinre/common/MessageDispatcher.scoop
----------------------------------------------------------------------
diff --git a/weinre.web/modules/weinre/common/MessageDispatcher.scoop b/weinre.web/modules/weinre/common/MessageDispatcher.scoop
deleted file mode 100644
index c207e01..0000000
--- a/weinre.web/modules/weinre/common/MessageDispatcher.scoop
+++ /dev/null
@@ -1,204 +0,0 @@
-
-/*
- * weinre is available under *either* the terms of the modified BSD license *or* the
- * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
- * 
- * Copyright (c) 2010, 2011 IBM Corporation
- */
-
-requireClass ./Weinre
-requireClass ./WebSocketXhr
-requireClass ./IDLTools
-requireClass ./Binding
-requireClass ./Ex
-requireClass ./Callback
-
-//-----------------------------------------------------------------------------
-class MessageDispatcher(url, id)
-    if (!id) {
-        id = "anonymous"
-    }
-
-    this._url        = url
-    this._id         = id
-    
-    this.error       = null
-    this._opening    = false
-    this._opened     = false
-    this._closed     = false
-    this._interfaces = {}
-    
-    this._open()
-
-//-----------------------------------------------------------------------------
-init
-    var Verbose = false
-    var InspectorBackend
-
-//-----------------------------------------------------------------------------
-static method setInspectorBackend(inspectorBackend)
-    InspectorBackend = inspectorBackend
-    
-//-----------------------------------------------------------------------------
-static method verbose(value)
-    if (arguments.length >= 1) {
-        Verbose = !!value
-    }
-    
-    return Verbose
-
-//-----------------------------------------------------------------------------
-method _open
-    if (this._opened || this._opening) return
-    if (this._closed) throw new Ex(arguments, "socket has already been closed")
-    
-    this._opening = true 
-    this._socket = new WebSocketXhr(this._url, this._id)
-    this._socket.addEventListener("open",    Binding(this, "_handleOpen"))
-    this._socket.addEventListener("error",   Binding(this, "_handleError"))
-    this._socket.addEventListener("message", Binding(this, "_handleMessage"))
-    this._socket.addEventListener("close",   Binding(this, "_handleClose"))
-
-//-----------------------------------------------------------------------------
-method close
-    if (this._closed) return
-    
-    this._opened = false
-    this._closed = true
-    
-    this._socket.close()
-
-//-----------------------------------------------------------------------------
-method send(data)
-    this._socket.send(data)
-
-//-----------------------------------------------------------------------------
-method getWebSocket
-    return this._socket
-
-//-----------------------------------------------------------------------------
-method registerInterface(intfName, intf, validate)
-    if (validate) IDLTools.validateAgainstIDL(intf.constructor, intfName)
-    
-    if (this._interfaces[intfName]) throw new Ex(arguments, "interface " + intfName + " has already been registered")
-    
-    this._interfaces[intfName] = intf
-
-//-----------------------------------------------------------------------------
-method createProxy(intfName)
-    var proxy = {}
-    
-    IDLTools.buildProxyForIDL(proxy, intfName)
-
-    var self = this
-    proxy.__invoke = function __invoke(intfName, methodName, args) {
-        self._sendMethodInvocation(intfName, methodName, args)
-    }
-    
-    return proxy
-
-//-----------------------------------------------------------------------------
-method _sendMethodInvocation(intfName, methodName, args)
-    if (typeof intfName   != "string") throw new Ex(arguments, "expecting intf parameter to be a string")
-    if (typeof methodName != "string") throw new Ex(arguments, "expecting method parameter to be a string")
-    
-    var data = {
-            "interface": intfName,
-            "method":    methodName,
-            "args":      args
-    }
-    
-    data = JSON.stringify(data)
-    
-    this._socket.send(data)
-    
-    if (Verbose) {
-        Weinre.logDebug(this.constructor.name + "[" + this._url + "]: send " + intfName + "." + methodName + "(" + JSON.stringify(args) + ")")
-    }
-
-//-----------------------------------------------------------------------------
-method getState
-    if (this._opening) return "opening"
-    if (this._opened)  return "opened"
-    if (this._closed)  return "closed"
-    return "unknown"
-
-//-----------------------------------------------------------------------------
-method isOpen
-    return this._opened == true
-
-//-----------------------------------------------------------------------------
-method _handleOpen(event)
-    this._opening = false
-    this._opened  = true
-    this.channel  = event.channel
-    
-    Callback.setConnectorChannel(this.channel)
-    
-    if (Verbose) {
-        Weinre.logDebug(this.constructor.name + "[" + this._url + "]: opened")
-    }
-
-//-----------------------------------------------------------------------------
-method _handleError(message)
-    this.error = message
-    this.close()
-
-    if (Verbose) {
-        Weinre.logDebug(this.constructor.name + "[" + this._url + "]: error: " + message)
-    }
-
-//-----------------------------------------------------------------------------
-method _handleMessage(message)
-    var data
-    
-    try {
-        data = JSON.parse(message.data)
-    }
-    catch (e) {
-        throw new Ex(arguments, "invalid JSON data received: " + e + ": '" + message.data + "'")
-    }
-
-    var intfName   = data["interface"]
-    var methodName = data.method
-    var args       = data.args
-
-    var methodSignature = intfName + "." + methodName + "()"
-    
-    var intf = this._interfaces.hasOwnProperty(intfName) && this._interfaces[intfName]
-    
-    if (!intf && InspectorBackend && intfName.match(/.*Notify/)) {
-        intf = InspectorBackend.getRegisteredDomainDispatcher(intfName.substr(0,intfName.length-6))
-    }
-    
-    if (!intf) {
-        Weinre.logWarning("weinre: request for non-registered interface:" + methodSignature)
-        return
-    }
-    
-    methodSignature = intf.constructor.name + "." + methodName + "()"
-    
-    var method = intf[methodName]
-    if (typeof method != "function") {
-        Weinre.notImplemented(methodSignature)
-        return
-    }
-    
-    try {
-        method.apply(intf, args)
-    }
-    catch (e) {
-        Weinre.logError("weinre: invocation exception on " + methodSignature + ": " + e)
-    }
-    
-    if (Verbose) {
-        Weinre.logDebug(this.constructor.name + "[" + this._url + "]: recv " + intfName + "." + methodName + "(" + JSON.stringify(args) + ")")
-    }
-
-//-----------------------------------------------------------------------------
-method _handleClose
-    this._reallyClosed = true
-    
-    if (Verbose) {
-        Weinre.logDebug(this.constructor.name + "[" + this._url + "]: closed")
-    }

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/9f1c7663/weinre.web/modules/weinre/common/MethodNamer.coffee
----------------------------------------------------------------------
diff --git a/weinre.web/modules/weinre/common/MethodNamer.coffee b/weinre.web/modules/weinre/common/MethodNamer.coffee
new file mode 100644
index 0000000..4d5c755
--- /dev/null
+++ b/weinre.web/modules/weinre/common/MethodNamer.coffee
@@ -0,0 +1,25 @@
+
+#---------------------------------------------------------------------------------
+# weinre is available under *either* the terms of the modified BSD license *or* the
+# MIT License (2008). See http:#opensource.org/licenses/alphabetical for full text.
+#
+# Copyright (c) 2010, 2011 IBM Corporation
+#---------------------------------------------------------------------------------
+
+module.exports = class MethodNamer
+
+    @setNamesForClass: (aClass) ->
+        for own key, val of aClass
+            if typeof(val) is "function"
+                val.signature   = "#{aClass.name}::#{key}"
+                val.displayName = key
+                val.name        = key
+
+        for own key, val of aClass.prototype
+            if typeof(val) is "function"
+                val.signature   = "#{aClass.name}.#{key}"
+                val.displayName = key
+                val.name        = key
+
+#-------------------------------------------------------------------------------
+MethodNamer.setNamesForClass(module.exports)

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/9f1c7663/weinre.web/modules/weinre/common/Native.coffee
----------------------------------------------------------------------
diff --git a/weinre.web/modules/weinre/common/Native.coffee b/weinre.web/modules/weinre/common/Native.coffee
new file mode 100644
index 0000000..04ea3c3
--- /dev/null
+++ b/weinre.web/modules/weinre/common/Native.coffee
@@ -0,0 +1,43 @@
+
+#---------------------------------------------------------------------------------
+# weinre is available under *either* the terms of the modified BSD license *or* the
+# MIT License (2008). See http:#opensource.org/licenses/alphabetical for full text.
+#
+# Copyright (c) 2010, 2011 IBM Corporation
+#---------------------------------------------------------------------------------
+
+exports.original = {}
+
+exports.original.clearInterval             = window.clearInterval
+exports.original.clearTimeout              = window.clearTimeout
+exports.original.setTimeout                = window.setTimeout
+exports.original.setInterval               = window.setInterval
+exports.original.XMLHttpRequest            = window.XMLHttpRequest
+exports.original.XMLHttpRequest_open       = window.XMLHttpRequest.prototype.open
+exports.original.LocalStorage_setItem      = window.localStorage?.setItem
+exports.original.LocalStorage_removeItem   = window.localStorage?.removeItem
+exports.original.LocalStorage_clear        = window.localStorage?.clear
+exports.original.SessionStorage_setItem    = window.sessionStorage?.setItem
+exports.original.SessionStorage_removeItem = window.sessionStorage?.removeItem
+exports.original.SessionStorage_clear      = window.sessionStorage?.clear
+exports.original.openDatabase              = window.openDatabase
+
+exports.clearInterval             = -> exports.original.clearInterval.apply( window, [].slice.call(arguments))
+exports.clearTimeout              = -> exports.original.clearTimeout.apply(  window, [].slice.call(arguments))
+exports.setInterval               = -> exports.original.setInterval.apply(   window, [].slice.call(arguments))
+exports.setTimeout                = -> exports.original.setTimeout.apply(    window, [].slice.call(arguments))
+exports.XMLHttpRequest            = -> new exports.original.XMLHttpRequest()
+exports.XMLHttpRequest_open       = -> exports.original.XMLHttpRequest_open.apply(this, [].slice.call(arguments))
+exports.LocalStorage_setItem      = -> exports.original.LocalStorage_setItem.apply(      window.localStorage,   [].slice.call(arguments))
+exports.LocalStorage_removeItem   = -> exports.original.LocalStorage_removeItem.apply(   window.localStorage,   [].slice.call(arguments))
+exports.LocalStorage_clear        = -> exports.original.LocalStorage_clear.apply(        window.localStorage,   [].slice.call(arguments))
+exports.SessionStorage_setItem    = -> exports.original.SessionStorage_setItem.apply(    window.sessionStorage, [].slice.call(arguments))
+exports.SessionStorage_removeItem = -> exports.original.SessionStorage_removeItem.apply( window.sessionStorage, [].slice.call(arguments))
+exports.SessionStorage_clear      = -> exports.original.SessionStorage_clear.apply(      window.sessionStorage, [].slice.call(arguments))
+exports.openDatabase              = -> exports.original.openDatabase.apply(              window,                [].slice.call(arguments))
+
+for own key, val of exports
+    if typeof(val) is "function"
+        val.signature   = "Native::#{key}"
+        val.displayName = key
+        val.name        = key

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/9f1c7663/weinre.web/modules/weinre/common/Native.scoop
----------------------------------------------------------------------
diff --git a/weinre.web/modules/weinre/common/Native.scoop b/weinre.web/modules/weinre/common/Native.scoop
deleted file mode 100644
index af28f0b..0000000
--- a/weinre.web/modules/weinre/common/Native.scoop
+++ /dev/null
@@ -1,43 +0,0 @@
-
-/*
- * weinre is available under *either* the terms of the modified BSD license *or* the
- * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
- * 
- * Copyright (c) 2011 IBM Corporation
- */
-
-//-----------------------------------------------------------------------------
-class Native
-
-//-----------------------------------------------------------------------------
-init
-    Native.original = {}
-
-    Native.original.clearInterval             = window.clearInterval
-    Native.original.clearTimeout              = window.clearTimeout
-    Native.original.setTimeout                = window.setTimeout
-    Native.original.setInterval               = window.setInterval
-    Native.original.XMLHttpRequest            = window.XMLHttpRequest
-    Native.original.XMLHttpRequest_open       = window.XMLHttpRequest.prototype.open
-    Native.original.LocalStorage_setItem      = window.localStorage   ? window.localStorage.setItem      : null
-    Native.original.LocalStorage_removeItem   = window.localStorage   ? window.localStorage.removeItem   : null
-    Native.original.LocalStorage_clear        = window.localStorage   ? window.localStorage.clear        : null
-    Native.original.SessionStorage_setItem    = window.sessionStorage ? window.sessionStorage.setItem    : null
-    Native.original.SessionStorage_removeItem = window.sessionStorage ? window.sessionStorage.removeItem : null
-    Native.original.SessionStorage_clear      = window.sessionStorage ? window.sessionStorage.clear      : null
-    Native.original.openDatabase              = window.openDatabase
-
-    Native.clearInterval             = function() { return Native.original.clearInterval.apply( window, [].slice.call(arguments))}
-    Native.clearTimeout              = function() { return Native.original.clearTimeout.apply(  window, [].slice.call(arguments))}
-    Native.setInterval               = function() { return Native.original.setInterval.apply(   window, [].slice.call(arguments))}
-    Native.setTimeout                = function() { return Native.original.setTimeout.apply(    window, [].slice.call(arguments))}
-    Native.XMLHttpRequest            = function() { return new Native.original.XMLHttpRequest()}
-    Native.XMLHttpRequest_open       = function() { return Native.original.XMLHttpRequest_open.apply(this, [].slice.call(arguments))}
-    Native.LocalStorage_setItem      = function() { return Native.original.LocalStorage_setItem.apply(      window.localStorage,   [].slice.call(arguments))}
-    Native.LocalStorage_removeItem   = function() { return Native.original.LocalStorage_removeItem.apply(   window.localStorage,   [].slice.call(arguments))}
-    Native.LocalStorage_clear        = function() { return Native.original.LocalStorage_clear.apply(        window.localStorage,   [].slice.call(arguments))}
-    Native.SessionStorage_setItem    = function() { return Native.original.SessionStorage_setItem.apply(    window.sessionStorage, [].slice.call(arguments))}
-    Native.SessionStorage_removeItem = function() { return Native.original.SessionStorage_removeItem.apply( window.sessionStorage, [].slice.call(arguments))}
-    Native.SessionStorage_clear      = function() { return Native.original.SessionStorage_clear.apply(      window.sessionStorage, [].slice.call(arguments))}
-    Native.openDatabase              = function() { return Native.original.openDatabase.apply( window, [].slice.call(arguments))}
-

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/9f1c7663/weinre.web/modules/weinre/common/StackTrace.coffee
----------------------------------------------------------------------
diff --git a/weinre.web/modules/weinre/common/StackTrace.coffee b/weinre.web/modules/weinre/common/StackTrace.coffee
new file mode 100644
index 0000000..b7ace3f
--- /dev/null
+++ b/weinre.web/modules/weinre/common/StackTrace.coffee
@@ -0,0 +1,55 @@
+
+#---------------------------------------------------------------------------------
+# weinre is available under *either* the terms of the modified BSD license *or* the
+# MIT License (2008). See http:#opensource.org/licenses/alphabetical for full text.
+#
+# Copyright (c) 2010, 2011 IBM Corporation
+#---------------------------------------------------------------------------------
+
+module.exports = class StackTrace
+
+    constructor: (args) ->
+        if not args or not args.callee
+            throw Error("first parameter to #{arguments.callee.signature} must be an Arguments object")
+
+        @trace = getTrace(args)
+
+    #---------------------------------------------------------------------------
+    @dump: (args) ->
+        args = args or arguments
+        stackTrace = new StackTrace(args)
+        stackTrace.dump()
+
+    #---------------------------------------------------------------------------
+    dump: ->
+        console.log "StackTrace:"
+        for frame in @trace
+            console.log "    " + frame
+
+#-------------------------------------------------------------------------------
+getTrace = (args) ->
+      result = []
+      visitedFuncs = []
+      func = args.callee
+
+      while func
+          if func.signature
+              result.push func.signature
+          else if func.displayName
+              result.push func.displayName
+          else if func.name
+              result.push func.name
+          else
+              result.push "<anonymous>"
+
+          unless -1 == visitedFuncs.indexOf(func)
+              result.push "... recursion"
+              return result
+
+          visitedFuncs.push func
+          func = func.caller
+
+      result
+
+#-------------------------------------------------------------------------------
+require("../common/MethodNamer").setNamesForClass(module.exports)

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/9f1c7663/weinre.web/modules/weinre/common/StackTrace.scoop
----------------------------------------------------------------------
diff --git a/weinre.web/modules/weinre/common/StackTrace.scoop b/weinre.web/modules/weinre/common/StackTrace.scoop
deleted file mode 100644
index a46b602..0000000
--- a/weinre.web/modules/weinre/common/StackTrace.scoop
+++ /dev/null
@@ -1,55 +0,0 @@
-
-/*
- * weinre is available under *either* the terms of the modified BSD license *or* the
- * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
- * 
- * Copyright (c) 2010, 2011 IBM Corporation
- */
-
-//-----------------------------------------------------------------------------
-class StackTrace(args)
-    if (!args || !args.callee) {
-        throw Error("first parameter to " + arguments.callee.signature + " must be an Arguments object") 
-    }
-    
-    this.trace = getTrace(args)
-
-//-----------------------------------------------------------------------------
-static method dump(args)
-    args = args || arguments
-    
-    var stackTrace = new StackTrace(args)
-    stackTrace.dump()
-
-//-----------------------------------------------------------------------------
-method dump
-    console.log("StackTrace:")
-    this.trace.forEach(function(frame) {
-        console.log("    " + frame)
-    })
-    
-//-----------------------------------------------------------------------------
-function getTrace(args)
-
-    var result = []
-    var visitedFuncs = []
-    
-    var func = args.callee
-    
-    while (func) {
-        if      (func.signature)   result.push(func.signature)
-        else if (func.displayName) result.push(func.displayName)
-        else if (func.name)        result.push(func.name)
-        else result.push("<anonymous>")
-
-        if (-1 != visitedFuncs.indexOf(func)) {
-            result.push("... recursion")
-            return result
-        }
-        
-        visitedFuncs.push(func)
-        
-        func = func.caller
-    }
-    
-    return result
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/9f1c7663/weinre.web/modules/weinre/common/WebSocketXhr.coffee
----------------------------------------------------------------------
diff --git a/weinre.web/modules/weinre/common/WebSocketXhr.coffee b/weinre.web/modules/weinre/common/WebSocketXhr.coffee
new file mode 100644
index 0000000..acc1f90
--- /dev/null
+++ b/weinre.web/modules/weinre/common/WebSocketXhr.coffee
@@ -0,0 +1,202 @@
+
+#---------------------------------------------------------------------------------
+# weinre is available under *either* the terms of the modified BSD license *or* the
+# MIT License (2008). See http:#opensource.org/licenses/alphabetical for full text.
+#
+# Copyright (c) 2010, 2011 IBM Corporation
+#---------------------------------------------------------------------------------
+
+Ex             = require('./Ex')
+Weinre         = require('./Weinre')
+EventListeners = require('./EventListeners')
+Native         = require('./Native')
+
+XMLHttpRequest = Native.XMLHttpRequest
+
+#-------------------------------------------------------------------------------
+module.exports = class WebSocketXhr
+
+    @CONNECTING = 0
+    @OPEN       = 1
+    @CLOSING    = 2
+    @CLOSED     = 3
+
+    #---------------------------------------------------------------------------
+    constructor: (url, id) ->
+        @initialize url, id
+
+    #---------------------------------------------------------------------------
+    initialize: (url, id) ->
+        id = "anonymous" unless id
+        @readyState = WebSocketXhr.CONNECTING
+        @_url = url
+        @_id = id
+        @_urlChannel = null
+        @_queuedSends = []
+        @_sendInProgress = true
+
+        @_listeners =
+            open:    new EventListeners()
+            message: new EventListeners()
+            error:   new EventListeners()
+            close:   new EventListeners()
+
+        @_getChannel()
+
+    #---------------------------------------------------------------------------
+    _getChannel: ->
+        body = JSON.stringify(id: @_id)
+        @_xhr @_url, "POST", body, @_handleXhrResponseGetChannel
+
+    #---------------------------------------------------------------------------
+    _handleXhrResponseGetChannel: (xhr) ->
+        return @_handleXhrResponseError(xhr) unless xhr.status == 200
+
+        try
+            object = JSON.parse(xhr.responseText)
+        catch e
+            @_fireEventListeners "error", message: "non-JSON response from channel open request"
+            @close()
+            return
+
+        unless object.channel
+            @_fireEventListeners "error", message: "channel open request did not include a channel"
+            @close()
+            return
+
+        @_urlChannel = @_url + "/" + object.channel
+        @readyState = WebSocketXhr.OPEN
+
+        @_fireEventListeners "open",
+            message: "open"
+            channel: object.channel
+
+        @_sendInProgress = false
+        @_sendQueued()
+        @_readLoop()
+
+    #---------------------------------------------------------------------------
+    _readLoop: ->
+        return if @readyState == WebSocketXhr.CLOSED
+        return if @readyState == WebSocketXhr.CLOSING
+
+        @_xhr @_urlChannel, "GET", "", @_handleXhrResponseGet
+
+    #---------------------------------------------------------------------------
+    _handleXhrResponseGet: (xhr) ->
+        self = this
+        return @_handleXhrResponseError(xhr) unless xhr.status == 200
+
+        try
+            datum = JSON.parse(xhr.responseText)
+        catch e
+            @readyState = WebSocketXhr.CLOSED
+            @_fireEventListeners "error", message: "non-JSON response from read request"
+            return
+
+        Native.setTimeout (->
+            self._readLoop()
+        ), 0
+
+        for data in datum
+            self._fireEventListeners "message", data: data
+
+    #---------------------------------------------------------------------------
+    send: (data) ->
+        unless typeof data == "string"
+            throw new Ex(arguments, @constructor.name + "." + @caller)
+
+        @_queuedSends.push data
+        return if @_sendInProgress
+        @_sendQueued()
+
+    #---------------------------------------------------------------------------
+    _sendQueued: ->
+        return if @_queuedSends.length == 0
+        return if @readyState == WebSocketXhr.CLOSED
+        return if @readyState == WebSocketXhr.CLOSING
+
+        datum = JSON.stringify(@_queuedSends)
+        @_queuedSends = []
+        @_sendInProgress = true
+        @_xhr @_urlChannel, "POST", datum, @_handleXhrResponseSend
+
+    #---------------------------------------------------------------------------
+    _handleXhrResponseSend: (xhr) ->
+        httpSocket = this
+        return @_handleXhrResponseError(xhr) unless xhr.status == 200
+
+        @_sendInProgress = false
+
+        Native.setTimeout (->
+            httpSocket._sendQueued()
+        ), 0
+
+    #---------------------------------------------------------------------------
+    close: ->
+        @_sendInProgress = true
+        @readyState = WebSocketXhr.CLOSING
+
+        @_fireEventListeners "close",
+            message: "closing"
+            wasClean: true
+
+        @readyState = WebSocketXhr.CLOSED
+
+    #---------------------------------------------------------------------------
+    addEventListener: (type, listener, useCapture) ->
+        @_getListeners(type).add listener, useCapture
+
+    #---------------------------------------------------------------------------
+    removeEventListener: (type, listener, useCapture) ->
+        @_getListeners(type).remove listener, useCapture
+
+    #---------------------------------------------------------------------------
+    _fireEventListeners: (type, event) ->
+        return if @readyState == WebSocketXhr.CLOSED
+
+        event.target = this
+        @_getListeners(type).fire event
+
+    #---------------------------------------------------------------------------
+    _getListeners: (type) ->
+        listeners = @_listeners[type]
+        if null == listeners
+            throw new Ex(arguments, "invalid event listener type: '#{type}'")
+        listeners
+
+    #---------------------------------------------------------------------------
+    _handleXhrResponseError: (xhr) ->
+        if xhr.status == 404
+            @close()
+            return
+
+        @_fireEventListeners "error",
+            target: this
+            status: xhr.status
+            message: "error from XHR invocation: " + xhr.statusText
+
+        Weinre.logError "error from XHR invocation: #{xhr.status}: " + xhr.statusText
+
+    #---------------------------------------------------------------------------
+    _xhr: (url, method, data, handler) ->
+        if null == handler
+            throw new Ex(arguments, "handler must not be null")
+
+        xhr = new XMLHttpRequest()
+        xhr.httpSocket = this
+        xhr.httpSocketHandler = handler
+        xhr.onreadystatechange = _xhrEventHandler
+        xhr.open method, url, true
+        xhr.setRequestHeader "Content-Type", "text/plain"
+        xhr.send data
+
+#-------------------------------------------------------------------------------
+_xhrEventHandler = (event) ->
+      xhr = event.target
+      return unless xhr.readyState == 4
+
+      xhr.httpSocketHandler.call xhr.httpSocket, xhr
+
+#-------------------------------------------------------------------------------
+require("../common/MethodNamer").setNamesForClass(module.exports)

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/9f1c7663/weinre.web/modules/weinre/common/WebSocketXhr.scoop
----------------------------------------------------------------------
diff --git a/weinre.web/modules/weinre/common/WebSocketXhr.scoop b/weinre.web/modules/weinre/common/WebSocketXhr.scoop
deleted file mode 100644
index 813e6a9..0000000
--- a/weinre.web/modules/weinre/common/WebSocketXhr.scoop
+++ /dev/null
@@ -1,211 +0,0 @@
-
-/*
- * weinre is available under *either* the terms of the modified BSD license *or* the
- * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
- * 
- * Copyright (c) 2010, 2011 IBM Corporation
- */
-
-requireClass ./Ex
-requireClass ./Weinre
-requireClass ./EventListeners
-requireClass ./Native
-
-//-----------------------------------------------------------------------------
-class WebSocketXhr(url, id)
-    this.initialize(url, id)
-    
-//-----------------------------------------------------------------------------
-init
-    var XMLHttpRequest = Native.XMLHttpRequest
-    
-    WebSocketXhr.CONNECTING = 0
-    WebSocketXhr.OPEN       = 1
-    WebSocketXhr.CLOSING    = 2
-    WebSocketXhr.CLOSED     = 3
-
-//-----------------------------------------------------------------------------
-method initialize(url, id)
-    if (!id) {
-        id = "anonymous"
-    }
-    
-    this.readyState      = WebSocketXhr.CONNECTING 
-    this._url            = url
-    this._id             = id
-    this._urlChannel     = null
-    this._queuedSends    = []
-    this._sendInProgress = true
-    
-    this._listeners = {
-        open:    new EventListeners(),
-        message: new EventListeners(),
-        error:   new EventListeners(),
-        close:   new EventListeners()
-    }
-    
-    this._getChannel()
-
-//-----------------------------------------------------------------------------
-method _getChannel
-    var body = JSON.stringify({ id: this._id})
-    this._xhr(this._url, "POST", body, this._handleXhrResponseGetChannel)
-
-//-----------------------------------------------------------------------------
-method _handleXhrResponseGetChannel(xhr)
-    if (xhr.status != 200) return this._handleXhrResponseError(xhr)
-
-    try {
-        var object = JSON.parse(xhr.responseText)
-    }
-    catch (e) {
-        this._fireEventListeners("error", {message: "non-JSON response from channel open request"})
-        this.close()
-        return
-    }
-    
-    if (!object.channel) {
-        this._fireEventListeners("error", {message: "channel open request did not include a channel"})
-        this.close()
-        return
-    }
-    
-    this._urlChannel = this._url + "/" + object.channel
-    this.readyState = WebSocketXhr.OPEN
-
-    this._fireEventListeners("open", { message: "open", channel: object.channel })
-    
-    this._sendInProgress = false
-    this._sendQueued()
-    
-    this._readLoop()
-
-//-----------------------------------------------------------------------------
-method _readLoop
-    if (this.readyState == WebSocketXhr.CLOSED) return
-    if (this.readyState == WebSocketXhr.CLOSING) return
-    
-    this._xhr(this._urlChannel, "GET", "", this._handleXhrResponseGet)
-
-//-----------------------------------------------------------------------------
-method _handleXhrResponseGet(xhr)
-    var self = this
-    
-    if (xhr.status != 200) return this._handleXhrResponseError(xhr)
-
-    try {
-        var datum = JSON.parse(xhr.responseText)
-    }
-    catch (e) {
-        this.readyState = WebSocketXhr.CLOSED
-        
-        this._fireEventListeners("error", {
-            message: "non-JSON response from read request"
-        })
-        return
-    }
-    
-    Native.setTimeout(function() {self._readLoop()}, 0)
-
-    datum.forEach(function(data) {
-        self._fireEventListeners("message", {data: data})
-    })
-
-//-----------------------------------------------------------------------------
-method send(data)
-    if (typeof data != "string") throw new Ex(arguments, this.constructor.name + "." + this.caller)
-
-    this._queuedSends.push(data)
-    
-    if (this._sendInProgress) return
-    this._sendQueued();
-
-//-----------------------------------------------------------------------------
-method _sendQueued
-    if (this._queuedSends.length == 0) return
-    if (this.readyState == WebSocketXhr.CLOSED) return
-    if (this.readyState == WebSocketXhr.CLOSING) return
-    
-    datum = JSON.stringify(this._queuedSends)
-    this._queuedSends = []
-    
-    this._sendInProgress = true
-    
-    this._xhr(this._urlChannel, "POST", datum, this._handleXhrResponseSend)
-
-//-----------------------------------------------------------------------------
-method _handleXhrResponseSend(xhr)
-    var httpSocket = this
-    
-    if (xhr.status != 200) return this._handleXhrResponseError(xhr)
-    
-    this._sendInProgress = false
-    Native.setTimeout(function() {httpSocket._sendQueued()}, 0)
-
-//-----------------------------------------------------------------------------
-method close
-    this._sendInProgress = true
-    this.readyState = WebSocketXhr.CLOSING
-    this._fireEventListeners("close", {
-        message: "closing",
-        wasClean: true
-    })
-    this.readyState = WebSocketXhr.CLOSED
-
-//-----------------------------------------------------------------------------
-method addEventListener(type, listener, useCapture)
-    this._getListeners(type).add(listener, useCapture)
-
-//-----------------------------------------------------------------------------
-method removeEventListener(type, listener, useCapture)
-    this._getListeners(type).remove(listener, useCapture)
-
-//-----------------------------------------------------------------------------
-method _fireEventListeners(type, event)
-    if (this.readyState == WebSocketXhr.CLOSED) return
-    
-    event.target = this
-    this._getListeners(type).fire(event)
-
-//-----------------------------------------------------------------------------
-method _getListeners(type)
-    var listeners = this._listeners[type]
-    if (null == listeners) throw new Ex(arguments, "invalid event listener type: '" + type + "'")
-    
-    return listeners
-
-//-----------------------------------------------------------------------------
-method _handleXhrResponseError(xhr)
-    if (xhr.status == 404) {
-        this.close()
-        return
-    }
-    
-    this._fireEventListeners("error", {
-        target: this,
-        status: xhr.status,
-        message: "error from XHR invocation: " + xhr.statusText
-    })
-    
-    Weinre.logError("error from XHR invocation: " + xhr.status + ": " + xhr.statusText)
-
-//-----------------------------------------------------------------------------
-method _xhr(url, method, data, handler)
-    if (null == handler) throw new Ex(arguments, "handler must not be null")
-    
-    var xhr = new XMLHttpRequest()
-    
-    xhr.httpSocket         = this
-    xhr.httpSocketHandler  = handler
-    xhr.onreadystatechange = _xhrEventHandler
-    
-    xhr.open(method, url, true)
-    xhr.setRequestHeader("Content-Type", "text/plain")
-    xhr.send(data)
-
-//-----------------------------------------------------------------------------
-function _xhrEventHandler(event)
-    var xhr = event.target
-    if (xhr.readyState != 4) return
-    
-    xhr.httpSocketHandler.call(xhr.httpSocket, xhr) 

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/9f1c7663/weinre.web/modules/weinre/common/Weinre.coffee
----------------------------------------------------------------------
diff --git a/weinre.web/modules/weinre/common/Weinre.coffee b/weinre.web/modules/weinre/common/Weinre.coffee
new file mode 100644
index 0000000..52bc180
--- /dev/null
+++ b/weinre.web/modules/weinre/common/Weinre.coffee
@@ -0,0 +1,97 @@
+
+#---------------------------------------------------------------------------------
+# weinre is available under *either* the terms of the modified BSD license *or* the
+# MIT License (2008). See http:#opensource.org/licenses/alphabetical for full text.
+#
+# Copyright (c) 2010, 2011 IBM Corporation
+#---------------------------------------------------------------------------------
+
+Ex         = require('./Ex')
+IDLTools   = require('./IDLTools')
+StackTrace = require('./StackTrace')
+
+_notImplemented     = {}
+_showNotImplemented = false
+CSSProperties       = []
+logger              = null
+
+#-------------------------------------------------------------------------------
+module.exports = class Weinre
+
+    #---------------------------------------------------------------------------
+    constructor: ->
+        throw new Ex(arguments, "this class is not intended to be instantiated")
+
+    #---------------------------------------------------------------------------
+    @addIDLs: (idls) ->
+        IDLTools.addIDLs idls
+
+    #---------------------------------------------------------------------------
+    @addCSSProperties: (cssProperties) ->
+        CSSProperties = cssProperties
+
+    #---------------------------------------------------------------------------
+    @getCSSProperties: ->
+        CSSProperties
+
+    #---------------------------------------------------------------------------
+    @deprecated: () ->
+        StackTrace.dump arguments
+
+    #---------------------------------------------------------------------------
+    @notImplemented: (thing) ->
+        return if _notImplemented[thing]
+
+        _notImplemented[thing] = true
+        return unless _showNotImplemented
+
+        Weinre.logWarning thing + " not implemented"
+
+    #---------------------------------------------------------------------------
+    @showNotImplemented: () ->
+        _showNotImplemented = true
+
+        for key of _notImplemented
+            Weinre.logWarning key + " not implemented"
+
+    #---------------------------------------------------------------------------
+    @logError: (message) ->
+        getLogger().logError message
+
+    #---------------------------------------------------------------------------
+    @logWarning: (message) ->
+        getLogger().logWarning message
+
+    #---------------------------------------------------------------------------
+    @logInfo: (message) ->
+        getLogger().logInfo message
+
+    #---------------------------------------------------------------------------
+    @logDebug: (message) ->
+        getLogger().logDebug message
+
+#-------------------------------------------------------------------------------
+class ConsoleLogger
+    logError:   (message) -> console.log "error: #{message}"
+    logWarning: (message) -> console.log "warning: #{message}"
+    logInfo:    (message) -> console.log "info: #{message}"
+    logDebug:   (message) -> console.log "debug: #{message}"
+
+consoleLogger = new ConsoleLogger()
+
+#-------------------------------------------------------------------------------
+getLogger = () ->
+    return logger if logger
+
+    if Weinre.client
+        logger = Weinre.WeinreClientCommands
+        return logger
+
+    if Weinre.target
+        logger = Weinre.WeinreTargetCommands
+        return logger
+
+    consoleLogger
+
+#-------------------------------------------------------------------------------
+require("../common/MethodNamer").setNamesForClass(module.exports)

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/9f1c7663/weinre.web/modules/weinre/common/Weinre.scoop
----------------------------------------------------------------------
diff --git a/weinre.web/modules/weinre/common/Weinre.scoop b/weinre.web/modules/weinre/common/Weinre.scoop
deleted file mode 100644
index 75c37d0..0000000
--- a/weinre.web/modules/weinre/common/Weinre.scoop
+++ /dev/null
@@ -1,80 +0,0 @@
-
-/*
- * weinre is available under *either* the terms of the modified BSD license *or* the
- * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
- * 
- * Copyright (c) 2010, 2011 IBM Corporation
- */
-
-requireClass ./Ex
-requireClass ./IDLTools
-requireClass ./StackTrace
-
-//-----------------------------------------------------------------------------
-class Weinre
-    throw new Ex(arguments, "this class is not intended to be instantiated")
-
-//-----------------------------------------------------------------------------
-init 
-    var _notImplemented     = {}
-    var _showNotImplemented = false
-    var CSSProperties       = []
-    var logger              = null
-
-//-----------------------------------------------------------------------------
-static method addIDLs(idls)
-    IDLTools.addIDLs(idls)
-
-//-----------------------------------------------------------------------------
-static method addCSSProperties(cssProperties)
-    CSSProperties = cssProperties
-
-//-----------------------------------------------------------------------------
-static method getCSSProperties
-    return CSSProperties
-
-//-----------------------------------------------------------------------------
-static method deprecated()
-    StackTrace.dump(arguments)
-    
-//-----------------------------------------------------------------------------
-static method notImplemented(thing)
-    if (_notImplemented[thing]) return
-    
-    _notImplemented[thing] = true
-    
-    if (!_showNotImplemented) return
-    Weinre.logWarning(thing + " not implemented")
-
-//-----------------------------------------------------------------------------
-static method showNotImplemented()
-    _showNotImplemented = true
-    for (var key in _notImplemented) {
-        Weinre.logWarning(key + " not implemented")
-    }
-    
-//-----------------------------------------------------------------------------
-static method logError(message)
-    getLogger().logError(message)
-
-//-----------------------------------------------------------------------------
-static method logWarning(message)
-    getLogger().logWarning(message)
-
-//-----------------------------------------------------------------------------
-static method logInfo(message)
-    getLogger().logInfo(message)
-
-//-----------------------------------------------------------------------------
-static method logDebug(message)
-    getLogger().logDebug(message)
-
-//-----------------------------------------------------------------------------
-function getLogger()
-    if (logger) return logger
-    
-    if      (Weinre.client) logger = Weinre.WeinreClientCommands
-    else if (Weinre.target) logger = Weinre.WeinreTargetCommands
-    
-    return logger
-    
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/9f1c7663/weinre.web/modules/weinre/target/CSSStore.coffee
----------------------------------------------------------------------
diff --git a/weinre.web/modules/weinre/target/CSSStore.coffee b/weinre.web/modules/weinre/target/CSSStore.coffee
new file mode 100644
index 0000000..27ce891
--- /dev/null
+++ b/weinre.web/modules/weinre/target/CSSStore.coffee
@@ -0,0 +1,346 @@
+
+#---------------------------------------------------------------------------------
+# weinre is available under *either* the terms of the modified BSD license *or* the
+# MIT License (2008). See http:#opensource.org/licenses/alphabetical for full text.
+#
+# Copyright (c) 2010, 2011 IBM Corporation
+#---------------------------------------------------------------------------------
+
+IDGenerator = require('../common/IDGenerator')
+Weinre      = require('../common/Weinre')
+
+Properties = []
+
+_elementMatchesSelector = null
+
+#-------------------------------------------------------------------------------
+module.exports = class CSSStore
+
+    #---------------------------------------------------------------------------
+    constructor: ->
+        @styleSheetMap = {}
+        @styleRuleMap  = {}
+        @styleDeclMap  = {}
+        @testElement   = document.createElement("div")
+
+    #---------------------------------------------------------------------------
+    @addCSSProperties: (properties) ->
+        Properties = properties
+
+    #---------------------------------------------------------------------------
+    getInlineStyle: (node) ->
+        styleObject = @_buildMirrorForStyle(node.style, true)
+
+        for cssProperty in styleObject.cssProperties
+            cssProperty.status = "style"
+
+        styleObject
+
+    #---------------------------------------------------------------------------
+    getComputedStyle: (node) ->
+        return {} unless node
+        return {} unless node.nodeType == Node.ELEMENT_NODE
+
+        styleObject = @_buildMirrorForStyle(window.getComputedStyle(node), false)
+        styleObject
+
+    #---------------------------------------------------------------------------
+    getMatchedCSSRules: (node) ->
+        result = []
+
+        for styleSheet in document.styleSheets
+            continue unless styleSheet.cssRules
+
+            for cssRule in styleSheet.cssRules
+                continue unless _elementMatchesSelector(node, cssRule.selectorText)
+                object = {}
+                object.ruleId = @_getStyleRuleId(cssRule)
+                object.selectorText = cssRule.selectorText
+                object.style = @_buildMirrorForStyle(cssRule.style, true)
+                result.push object
+
+        result
+
+    #---------------------------------------------------------------------------
+    getStyleAttributes: (node) ->
+        result = {}
+        result
+
+    #---------------------------------------------------------------------------
+    getPseudoElements: (node) ->
+        result = []
+        result
+
+    #---------------------------------------------------------------------------
+    setPropertyText: (styleId, propertyIndex, text, overwrite) ->
+        styleDecl = Weinre.cssStore._getStyleDecl(styleId)
+
+        unless styleDecl
+          Weinre.logWarning "requested style not available: " + styleId
+          return null
+
+        mirror = styleDecl.__weinre__mirror
+        unless mirror
+          Weinre.logWarning "requested mirror not available: " + styleId
+          return null
+
+        properties = mirror.cssProperties
+        propertyMirror = @_parseProperty(text)
+
+        if null == propertyMirror
+          @_removePropertyFromMirror mirror, propertyIndex
+          properties = mirror.cssProperties
+
+        else
+          @_removePropertyFromMirror mirror, propertyIndex
+          properties = mirror.cssProperties
+          propertyIndices = {}
+          i = 0
+
+          while i < properties.length
+            propertyIndices[properties[i].name] = i
+            i++
+          i = 0
+
+          while i < propertyMirror.cssProperties.length
+            if propertyIndices[propertyMirror.cssProperties[i].name]?
+              properties[propertyIndices[propertyMirror.cssProperties[i].name]] = propertyMirror.cssProperties[i]
+            else
+              properties.push propertyMirror.cssProperties[i]
+            i++
+
+          for key of propertyMirror.shorthandValues
+            mirror.shorthandValues[key] = propertyMirror.shorthandValues[key]
+
+        properties.sort compare = (p1, p2) ->
+          if p1.name < p2.name
+            -1
+          else if p1.name > p2.name
+            1
+          else
+            0
+
+        @_setStyleFromMirror styleDecl
+        mirror
+
+    #---------------------------------------------------------------------------
+    _removePropertyFromMirror: (mirror, index) ->
+        properties = mirror.cssProperties
+        return if index >= properties.length
+        property = properties[index]
+        properties[index] = null
+
+        if mirror.shorthandValues[property.name]
+            delete mirror.shorthandValues[property.name]
+
+            i = 0
+
+            while i < properties.length
+                if properties[i]
+                    if properties[i].shorthandName == property.name
+                        properties[i] = null
+                i++
+
+        newProperties = []
+        i = 0
+
+        while i < properties.length
+            newProperties.push properties[i] if properties[i]
+            i++
+
+        mirror.cssProperties = newProperties
+
+    #---------------------------------------------------------------------------
+    toggleProperty: (styleId, propertyIndex, disable) ->
+        styleDecl = Weinre.cssStore._getStyleDecl(styleId)
+        unless styleDecl
+            Weinre.logWarning "requested style not available: " + styleId
+            return null
+
+        mirror = styleDecl.__weinre__mirror
+        unless mirror
+            Weinre.logWarning "requested mirror not available: " + styleId
+            return null
+
+        cssProperty = mirror.cssProperties[propertyIndex]
+        unless cssProperty
+            Weinre.logWarning "requested property not available: #{styleId}: " + propertyIndex
+            return null
+
+        if disable
+            cssProperty.status = "disabled"
+        else
+            cssProperty.status = "active"
+
+        @_setStyleFromMirror styleDecl
+        mirror
+
+    #---------------------------------------------------------------------------
+    _setStyleFromMirror: (styleDecl) ->
+        cssText = []
+        cssProperties = styleDecl.__weinre__mirror.cssProperties
+        cssText = ""
+
+        for property in cssProperties
+            continue unless property.parsedOk
+            continue if property.status == "disabled"
+            continue if property.shorthandName
+
+            cssText += property.name + ": " + property.value
+            if property.priority == "important"
+                cssText += " !important; "
+            else
+                cssText += "; "
+
+        styleDecl.cssText = cssText
+
+    #---------------------------------------------------------------------------
+    _buildMirrorForStyle: (styleDecl, bind) ->
+        result =
+          properties: {}
+          cssProperties: []
+
+        return result unless styleDecl
+        if bind
+          result.styleId = @_getStyleDeclId(styleDecl)
+          styleDecl.__weinre__mirror = result
+
+        result.properties.width = styleDecl.getPropertyValue("width") or ""
+        result.properties.height = styleDecl.getPropertyValue("height") or ""
+        result.cssText = styleDecl.cssText
+        result.shorthandValues = {}
+
+        properties = []
+        if styleDecl
+          i = 0
+
+          while i < styleDecl.length
+            property = {}
+            name = styleDecl.item(i)
+            property.name          = name
+            property.priority      = styleDecl.getPropertyPriority(name)
+            property.implicit      = styleDecl.isPropertyImplicit(name)
+            property.shorthandName = styleDecl.getPropertyShorthand(name) or ""
+            property.status        = (if property.shorthandName then "style" else "active")
+            property.parsedOk      = true
+            property.value         = styleDecl.getPropertyValue(name)
+            properties.push property
+
+            if property.shorthandName
+              shorthandName = property.shorthandName
+
+              unless result.shorthandValues[shorthandName]
+                result.shorthandValues[shorthandName] = styleDecl.getPropertyValue(shorthandName)
+                property = {}
+                property.name          = shorthandName
+                property.priority      = styleDecl.getPropertyPriority(shorthandName)
+                property.implicit      = styleDecl.isPropertyImplicit(shorthandName)
+                property.shorthandName = ""
+                property.status        = "active"
+                property.parsedOk      = true
+                property.value         = styleDecl.getPropertyValue(name)
+                properties.push property
+            i++
+
+        properties.sort (p1, p2) ->
+          if p1.name < p2.name
+            -1
+          else if p1.name > p2.name
+            1
+          else
+            0
+
+        result.cssProperties = properties
+        result
+
+    #---------------------------------------------------------------------------
+    _parseProperty: (string) ->
+        testStyleDecl = @testElement.style
+
+        try
+            testStyleDecl.cssText = string
+            unless testStyleDecl.cssText == ""
+                return @_buildMirrorForStyle(testStyleDecl, false)
+
+        propertyPattern = /\s*(.+)\s*:\s*(.+)\s*(!important)?\s*;/
+        match = propertyPattern.exec(string)
+        return null unless match
+
+        match[3] = (if (match[3] == "!important") then "important" else "")
+
+        property = {}
+        property.name          = match[1]
+        property.priority      = match[3]
+        property.implicit      = true
+        property.shorthandName = ""
+        property.status        = "inactive"
+        property.parsedOk      = false
+        property.value         = match[2]
+
+        result = {}
+        result.width           = 0
+        result.height          = 0
+        result.shorthandValues = 0
+        result.cssProperties   = [ property ]
+
+        result
+
+    #---------------------------------------------------------------------------
+    _getStyleSheet: (id) ->
+        _getMappableObject id, @styleSheetMap
+
+    #---------------------------------------------------------------------------
+    _getStyleSheetId: (styleSheet) ->
+        _getMappableId styleSheet, @styleSheetMap
+
+    #---------------------------------------------------------------------------
+    _getStyleRule: (id) ->
+        _getMappableObject id, @styleRuleMap
+
+    #---------------------------------------------------------------------------
+    _getStyleRuleId: (styleRule) ->
+        _getMappableId styleRule, @styleRuleMap
+
+    #---------------------------------------------------------------------------
+    _getStyleDecl: (id) ->
+        _getMappableObject id, @styleDeclMap
+
+    #---------------------------------------------------------------------------
+    _getStyleDeclId: (styleDecl) ->
+        _getMappableId styleDecl, @styleDeclMap
+
+#-------------------------------------------------------------------------------
+_getMappableObject = (id, map) ->
+      map[id]
+
+#-------------------------------------------------------------------------------
+_getMappableId = (object, map) ->
+      IDGenerator.getId object, map
+
+#-------------------------------------------------------------------------------
+_mozMatchesSelector = (element, selector) ->
+      return false unless element.mozMatchesSelector
+      element.mozMatchesSelector selector
+
+#-------------------------------------------------------------------------------
+_webkitMatchesSelector = (element, selector) ->
+      return false unless element.webkitMatchesSelector
+      element.webkitMatchesSelector selector
+
+#-------------------------------------------------------------------------------
+_fallbackMatchesSelector = (element, selector) ->
+      false
+
+#-------------------------------------------------------------------------------
+if      (Element.prototype.webkitMatchesSelector)
+    _elementMatchesSelector = _webkitMatchesSelector
+
+else if (Element.prototype.mozMatchesSelector)
+    _elementMatchesSelector = _mozMatchesSelector
+
+else
+    _elementMatchesSelector = _fallbackMatchesSelector
+
+#-------------------------------------------------------------------------------
+require("../common/MethodNamer").setNamesForClass(module.exports)
+

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/9f1c7663/weinre.web/modules/weinre/target/CSSStore.scoop
----------------------------------------------------------------------
diff --git a/weinre.web/modules/weinre/target/CSSStore.scoop b/weinre.web/modules/weinre/target/CSSStore.scoop
deleted file mode 100644
index 5d7575a..0000000
--- a/weinre.web/modules/weinre/target/CSSStore.scoop
+++ /dev/null
@@ -1,391 +0,0 @@
-
-/*
- * weinre is available under *either* the terms of the modified BSD license *or* the
- * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
- * 
- * Copyright (c) 2010, 2011 IBM Corporation
- */
-
-requireClass ../common/IDGenerator
-requireClass ../common/Weinre
-
-//-----------------------------------------------------------------------------
-class CSSStore
-    this.styleSheetMap = {}
-    this.styleRuleMap  = {}
-    this.styleDeclMap  = {}
-    this.testElement = document.createElement("div")
-
-//-----------------------------------------------------------------------------
-init
-    var Properties = []
-
-//-----------------------------------------------------------------------------
-static method addCSSProperties(properties)
-    Properties = properties
-
-//-----------------------------------------------------------------------------
-method getInlineStyle(node)
-    var styleObject = this._buildMirrorForStyle(node.style, true)
-    for (var i=0; i<styleObject.cssProperties.length; i++) {
-        styleObject.cssProperties[i].status = "style"
-    }
-    return styleObject
-
-//-----------------------------------------------------------------------------
-method getComputedStyle(node)
-    if (!node) return {}
-    if (node.nodeType != Node.ELEMENT_NODE) return {}
-    
-    var styleObject = this._buildMirrorForStyle(window.getComputedStyle(node), false)
-    return styleObject
-
-//-----------------------------------------------------------------------------
-method getMatchedCSSRules(node)
-    var result = []
-    
-    for (var i=0; i<document.styleSheets.length; i++) {
-        var styleSheet = document.styleSheets[i]
-        
-        if (!styleSheet.cssRules) continue
-        
-        for (var j=0; j<styleSheet.cssRules.length; j++) {
-            var cssRule = styleSheet.cssRules[j]
-            
-            if (!_elementMatchesSelector(node, cssRule.selectorText)) continue
-            
-            var object = {}
-            
-            object.ruleId = this._getStyleRuleId(cssRule)
-            object.selectorText = cssRule.selectorText
-            object.style = this._buildMirrorForStyle(cssRule.style, true)
-            result.push(object)
-        }
-    }
-    
-    return result
-
-//-----------------------------------------------------------------------------
-method getStyleAttributes(node)
-    var result = {}
-    
-    return result
-
-//-----------------------------------------------------------------------------
-method getPseudoElements(node)
-    var result = []
-    
-    return result
-
-//-----------------------------------------------------------------------------
-method setPropertyText(styleId, propertyIndex, text, overwrite)
-    var styleDecl = Weinre.cssStore._getStyleDecl(styleId)
-    
-    if (!styleDecl) {
-        Weinre.logWarning("requested style not available: " + styleId)
-        return null
-    }
-
-    var mirror = styleDecl.__weinre__mirror
-    if (!mirror) {
-        Weinre.logWarning("requested mirror not available: " + styleId)
-        return null
-    }
-
-    var properties = mirror.cssProperties
-    
-    // parse the css text
-    var propertyMirror = this._parseProperty(text)
-    
-    // remove property
-    if (null == propertyMirror) {
-        this._removePropertyFromMirror(mirror, propertyIndex)
-        properties = mirror.cssProperties
-    }
-    
-    // add or replace property
-    else {
-        // if replacing, remove the old one
-        this._removePropertyFromMirror(mirror, propertyIndex)
-        properties = mirror.cssProperties
-
-        // index properties by name
-        var propertyIndices = {}
-        for (var i=0; i<properties.length; i++) {
-            propertyIndices[properties[i].name] = i
-        }
-
-        // add the new ones, or replacing ones    
-        for (var i=0; i<propertyMirror.cssProperties.length; i++) {
-            if (propertyIndices[propertyMirror.cssProperties[i].name] != null) {
-                // property already exists, just replace it
-                properties[propertyIndices[propertyMirror.cssProperties[i].name]] = propertyMirror.cssProperties[i]
-            }
-            else {
-                // new property, add it
-                properties.push(propertyMirror.cssProperties[i])
-            }
-        }
-    
-        for (var key in propertyMirror.shorthandValues) {
-            mirror.shorthandValues[key] = propertyMirror.shorthandValues[key]
-        }
-    }
-    
-    properties.sort(function(p1,p2) {
-        if      (p1.name < p2.name) return -1
-        else if (p1.name > p2.name) return  1
-        else return 0
-    })
-    
-    this._setStyleFromMirror(styleDecl)
-    
-    return mirror
-
-//-----------------------------------------------------------------------------
-method _removePropertyFromMirror(mirror, index)
-    var properties = mirror.cssProperties
-    
-    if (index >= properties.length) return
-    
-    var property = properties[index]
-
-    properties[index] = null
-    
-    if (mirror.shorthandValues[property.name]) {
-        delete mirror.shorthandValues[property.name]
-        
-        for (var i=0; i<properties.length; i++) {
-            if (properties[i]) {
-                if (properties[i].shorthandName == property.name) {
-                    properties[i] = null
-                }
-            }
-        }
-    }
-    
-    var newProperties = []
-    
-    for (var i=0; i<properties.length; i++) {
-        if (properties[i]) newProperties.push(properties[i])
-    }
-    
-    mirror.cssProperties = newProperties
-
-//-----------------------------------------------------------------------------
-method toggleProperty(styleId, propertyIndex, disable)
-    var styleDecl = Weinre.cssStore._getStyleDecl(styleId)
-    
-    if (!styleDecl) {
-        Weinre.logWarning("requested style not available: " + styleId)
-        return null
-    }
-    
-    var mirror = styleDecl.__weinre__mirror
-    if (!mirror) {
-        Weinre.logWarning("requested mirror not available: " + styleId)
-        return null
-    }
-    
-    var cssProperty = mirror.cssProperties[propertyIndex]
-    if (!cssProperty) {
-        Weinre.logWarning("requested property not available: " + styleId + ": " + propertyIndex)
-        return null
-    }
-    
-    if (disable) {
-        cssProperty.status = "disabled"
-    }
-    
-    else {
-        cssProperty.status = "active"
-    }
-
-    this._setStyleFromMirror(styleDecl)
-    
-    return mirror
-
-//-----------------------------------------------------------------------------
-method _setStyleFromMirror(styleDecl)
-    var cssText = []
-    
-    var cssProperties = styleDecl.__weinre__mirror.cssProperties
-    
-    var cssText = ""
-    for (var i=0; i<cssProperties.length; i++) {
-        var property = cssProperties[i]
-        
-        if (!property.parsedOk) continue
-        if (property.status == "disabled") continue
-        if (property.shorthandName) continue
-        
-        cssText += property.name + ": " + property.value
-        if (property.priority == "important") {
-            cssText += " !important; "
-        }
-        else {
-            cssText += "; "
-        }
-    }
-    
-    styleDecl.cssText = cssText
-
-//-----------------------------------------------------------------------------
-method _buildMirrorForStyle(styleDecl, bind)
-    var result = {
-        properties:    {},
-        cssProperties: []
-    }
-    
-    if (!styleDecl) return result
-    
-    if (bind) {
-        result.styleId = this._getStyleDeclId(styleDecl)
-        styleDecl.__weinre__mirror = result
-    }
-    
-    result.properties.width  = styleDecl.getPropertyValue("width")  || ""
-    result.properties.height = styleDecl.getPropertyValue("height") || ""
-    result.cssText           = styleDecl.cssText 
-
-    result.shorthandValues = {}
-
-    var properties = []
-    
-    if (styleDecl) {
-        for (var i=0; i < styleDecl.length; i++) {
-            var property = {}
-            var name = styleDecl.item(i)
-
-            property.name          = name
-            property.priority      = styleDecl.getPropertyPriority(name)
-            property.implicit      = styleDecl.isPropertyImplicit(name)
-            property.shorthandName = styleDecl.getPropertyShorthand(name) || ""
-            property.status        = property.shorthandName ? "style" : "active"
-            property.parsedOk      = true
-            property.value         = styleDecl.getPropertyValue(name)
-            
-            properties.push(property);
-            
-            if (property.shorthandName) {
-                var shorthandName = property.shorthandName
-                if (!result.shorthandValues[shorthandName]) {
-                    result.shorthandValues[shorthandName] = styleDecl.getPropertyValue(shorthandName)
-                    
-                    property = {}
-                    property.name          = shorthandName
-                    property.priority      = styleDecl.getPropertyPriority(shorthandName)
-                    property.implicit      = styleDecl.isPropertyImplicit(shorthandName)
-                    property.shorthandName = ""
-                    property.status        = "active"
-                    property.parsedOk      = true
-                    property.value         = styleDecl.getPropertyValue(name)
-                    
-                    properties.push(property);
-                }
-            }
-        }
-    }
-    
-    properties.sort(function(p1,p2) {
-        if      (p1.name < p2.name) return -1
-        else if (p1.name > p2.name) return  1
-        else return 0
-    })
-    
-    result.cssProperties   = properties
-
-    return result
-
-//-----------------------------------------------------------------------------
-method _parseProperty(string)
-    var testStyleDecl = this.testElement.style
-    
-    try {
-        testStyleDecl.cssText = string
-        
-        if (testStyleDecl.cssText != "") {
-            return this._buildMirrorForStyle(testStyleDecl, false)
-        }
-    }
-    catch(e) {
-    }
-
-    var propertyPattern = /\s*(.+)\s*:\s*(.+)\s*(!important)?\s*;/
-    var match = propertyPattern.exec(string)
-    if (!match) return null
-
-    match[3] = (match[3] == "!important") ? "important" : ""
-
-    var property = {}
-
-    property.name          = match[1]
-    property.priority      = match[3]
-    property.implicit      = true
-    property.shorthandName = ""
-    property.status        = "inactive"
-    property.parsedOk      = false
-    property.value         = match[2]
-
-    var result = {}
-    
-    result.width           = 0
-    result.height          = 0
-    result.shorthandValues = 0
-    result.cssProperties   = [ property ]
-
-    return result
-
-//-----------------------------------------------------------------------------
-method _getStyleSheet(id)
-    return _getMappableObject(id, this.styleSheetMap)
-
-//-----------------------------------------------------------------------------
-method _getStyleSheetId(styleSheet)
-    return _getMappableId(styleSheet, this.styleSheetMap)
-
-//-----------------------------------------------------------------------------
-method _getStyleRule(id)
-    return _getMappableObject(id, this.styleRuleMap)
-
-//-----------------------------------------------------------------------------
-method _getStyleRuleId(styleRule)
-    return _getMappableId(styleRule, this.styleRuleMap)
-
-//-----------------------------------------------------------------------------
-method _getStyleDecl(id)
-    return _getMappableObject(id, this.styleDeclMap)
-
-//-----------------------------------------------------------------------------
-method _getStyleDeclId(styleDecl)
-    return _getMappableId(styleDecl, this.styleDeclMap)
-
-//-----------------------------------------------------------------------------
-function _getMappableObject(id, map)
-    return map[id]
-
-//-----------------------------------------------------------------------------
-function _getMappableId(object, map)
-    return IDGenerator.getId(object, map)
-    
-//-----------------------------------------------------------------------------
-function _mozMatchesSelector(element, selector)
-    if (!element.mozMatchesSelector) return false
-    return element.mozMatchesSelector(selector)
-
-//-----------------------------------------------------------------------------
-function _webkitMatchesSelector(element, selector)
-    if (!element.webkitMatchesSelector) return false
-    return element.webkitMatchesSelector(selector)
-
-//-----------------------------------------------------------------------------
-function _fallbackMatchesSelector(element, selector)
-    return false
-    
-//-----------------------------------------------------------------------------
-init
-    var _elementMatchesSelector
-    
-    if      (Element.prototype.webkitMatchesSelector) _elementMatchesSelector = _webkitMatchesSelector 
-    else if (Element.prototype.mozMatchesSelector)    _elementMatchesSelector = _mozMatchesSelector
-    else                                              _elementMatchesSelector = _fallbackMatchesSelector
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/9f1c7663/weinre.web/modules/weinre/target/CheckForProblems.coffee
----------------------------------------------------------------------
diff --git a/weinre.web/modules/weinre/target/CheckForProblems.coffee b/weinre.web/modules/weinre/target/CheckForProblems.coffee
new file mode 100644
index 0000000..cb30171
--- /dev/null
+++ b/weinre.web/modules/weinre/target/CheckForProblems.coffee
@@ -0,0 +1,30 @@
+
+#---------------------------------------------------------------------------------
+# weinre is available under *either* the terms of the modified BSD license *or* the
+# MIT License (2008). See http:#opensource.org/licenses/alphabetical for full text.
+#
+# Copyright (c) 2010, 2011 IBM Corporation
+#---------------------------------------------------------------------------------
+
+module.exports = class CheckForProblems
+
+    constructor: ->
+
+    #---------------------------------------------------------------------------
+    @check: ->
+        checkForOldPrototypeVersion()
+
+#-------------------------------------------------------------------------------
+checkForOldPrototypeVersion = () ->
+      badVersion = false
+      return if typeof Prototype == "undefined"
+      return unless Prototype.Version
+
+      badVersion = true if Prototype.Version.match(/^1\.5.*/)
+      badVersion = true if Prototype.Version.match(/^1\.6.*/)
+
+      if badVersion
+          alert "Sorry, weinre is not support in versions of Prototype earlier than 1.7"
+
+#-------------------------------------------------------------------------------
+require("../common/MethodNamer").setNamesForClass(module.exports)

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/9f1c7663/weinre.web/modules/weinre/target/CheckForProblems.scoop
----------------------------------------------------------------------
diff --git a/weinre.web/modules/weinre/target/CheckForProblems.scoop b/weinre.web/modules/weinre/target/CheckForProblems.scoop
deleted file mode 100644
index dc25ab8..0000000
--- a/weinre.web/modules/weinre/target/CheckForProblems.scoop
+++ /dev/null
@@ -1,28 +0,0 @@
-
-/*
- * weinre is available under *either* the terms of the modified BSD license *or* the
- * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
- * 
- * Copyright (c) 2010, 2011 IBM Corporation
- */
-
-//-----------------------------------------------------------------------------
-class CheckForProblems
-
-//-----------------------------------------------------------------------------
-static method check
-    checkForOldPrototypeVersion()
-
-//-----------------------------------------------------------------------------
-function checkForOldPrototypeVersion
-    var badVersion = false
-
-    if (typeof Prototype == "undefined") return
-    if (!Prototype.Version) return
-    
-    if (Prototype.Version.match(/^1\.5.*/)) badVersion = true
-    if (Prototype.Version.match(/^1\.6.*/)) badVersion = true
-    
-    if (badVersion) {
-        alert("Sorry, weinre is not support in versions of Prototype earlier than 1.7")
-    }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/9f1c7663/weinre.web/modules/weinre/target/Console.coffee
----------------------------------------------------------------------
diff --git a/weinre.web/modules/weinre/target/Console.coffee b/weinre.web/modules/weinre/target/Console.coffee
new file mode 100644
index 0000000..800c84f
--- /dev/null
+++ b/weinre.web/modules/weinre/target/Console.coffee
@@ -0,0 +1,164 @@
+
+#---------------------------------------------------------------------------------
+# weinre is available under *either* the terms of the modified BSD license *or* the
+# MIT License (2008). See http:#opensource.org/licenses/alphabetical for full text.
+#
+# Copyright (c) 2010, 2011 IBM Corporation
+#---------------------------------------------------------------------------------
+
+Weinre   = require('../common/Weinre')
+Timeline = require('../target/Timeline')
+
+UsingRemote = false
+
+RemoteConsole   = null
+OriginalConsole = null
+
+MessageSource =
+    HTML:  0
+    WML:   1
+    XML:   2
+    JS:    3
+    CSS:   4
+    Other: 5
+
+MessageType =
+    Log:                 0
+    Object:              1
+    Trace:               2
+    StartGroup:          3
+    StartGroupCollapsed: 4
+    EndGroup:            5
+    Assert:              6
+    UncaughtException:   7
+    Result:              8
+
+MessageLevel =
+    Tip:     0
+    Log:     1
+    Warning: 2
+    Error:   3
+    Debug:   4
+
+#-------------------------------------------------------------------------------
+module.exports = class Console
+
+    #---------------------------------------------------------------------------
+    Console::__defineGetter__("original", -> OriginalConsole)
+
+    #---------------------------------------------------------------------------
+    @useRemote: (value) ->
+        return UsingRemote if arguments.length == 0
+
+        oldValue = UsingRemote
+        UsingRemote = not not value
+
+        if UsingRemote
+            window.console = RemoteConsole
+        else
+            window.console = OriginalConsole
+
+        oldValue
+
+    #---------------------------------------------------------------------------
+    _generic: (level, messageParts) ->
+        message = messageParts[0].toString()
+        parameters = []
+
+        for messagePart in messageParts
+            parameters.push Weinre.injectedScript.wrapObjectForConsole(messagePart, true)
+
+        payload =
+            source: MessageSource.JS
+            type: MessageType.Log
+            level: level
+            message: message
+            parameters: parameters
+
+        Weinre.wi.ConsoleNotify.addConsoleMessage payload
+
+    #---------------------------------------------------------------------------
+    log: ->
+        @_generic MessageLevel.Log, [].slice.call(arguments)
+
+    #---------------------------------------------------------------------------
+    debug: ->
+        @_generic MessageLevel.Debug, [].slice.call(arguments)
+
+    #---------------------------------------------------------------------------
+    error: ->
+        @_generic MessageLevel.Error, [].slice.call(arguments)
+
+    #---------------------------------------------------------------------------
+    info: ->
+        @_generic MessageLevel.Log, [].slice.call(arguments)
+
+    #---------------------------------------------------------------------------
+    warn: ->
+        @_generic MessageLevel.Warning, [].slice.call(arguments)
+
+    #---------------------------------------------------------------------------
+    dir: ->
+        Weinre.notImplemented arguments.callee.signature
+
+    #---------------------------------------------------------------------------
+    dirxml: ->
+        Weinre.notImplemented arguments.callee.signature
+
+    #---------------------------------------------------------------------------
+    trace: ->
+        Weinre.notImplemented arguments.callee.signature
+
+    #---------------------------------------------------------------------------
+    assert: (condition) ->
+        Weinre.notImplemented arguments.callee.signature
+
+    #---------------------------------------------------------------------------
+    count: ->
+        Weinre.notImplemented arguments.callee.signature
+
+    #---------------------------------------------------------------------------
+    markTimeline: (message) ->
+        Timeline.addRecord_Mark message
+
+    #---------------------------------------------------------------------------
+    lastWMLErrorMessage: ->
+        Weinre.notImplemented arguments.callee.signature
+
+    #---------------------------------------------------------------------------
+    profile: (title) ->
+        Weinre.notImplemented arguments.callee.signature
+
+    #---------------------------------------------------------------------------
+    profileEnd: (title) ->
+        Weinre.notImplemented arguments.callee.signature
+
+    #---------------------------------------------------------------------------
+    time: (title) ->
+        Weinre.notImplemented arguments.callee.signature
+
+    #---------------------------------------------------------------------------
+    timeEnd: (title) ->
+        Weinre.notImplemented arguments.callee.signature
+
+    #---------------------------------------------------------------------------
+    group: ->
+        Weinre.notImplemented arguments.callee.signature
+
+    #---------------------------------------------------------------------------
+    groupCollapsed: ->
+        Weinre.notImplemented arguments.callee.signature
+
+    #---------------------------------------------------------------------------
+    groupEnd: ->
+        Weinre.notImplemented arguments.callee.signature
+
+#-------------------------------------------------------------------------------
+RemoteConsole   = new Console()
+OriginalConsole = window.console
+
+RemoteConsole.__original   = OriginalConsole
+OriginalConsole.__original = OriginalConsole
+
+#-------------------------------------------------------------------------------
+require("../common/MethodNamer").setNamesForClass(module.exports)

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/9f1c7663/weinre.web/modules/weinre/target/Console.scoop
----------------------------------------------------------------------
diff --git a/weinre.web/modules/weinre/target/Console.scoop b/weinre.web/modules/weinre/target/Console.scoop
deleted file mode 100644
index 3d95827..0000000
--- a/weinre.web/modules/weinre/target/Console.scoop
+++ /dev/null
@@ -1,169 +0,0 @@
-
-/*
- * weinre is available under *either* the terms of the modified BSD license *or* the
- * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
- * 
- * Copyright (c) 2010, 2011 IBM Corporation
- */
-
-requireClass ../common/Weinre
-requireClass ../target/Timeline
-
-//-----------------------------------------------------------------------------
-class Console
-
-//-----------------------------------------------------------------------------
-init
-    var UsingRemote = false
-    
-    var RemoteConsole   = new Console()
-    var OriginalConsole = window.console
-    
-    RemoteConsole.__original   = OriginalConsole
-    OriginalConsole.__original = OriginalConsole
-    
-    var MessageSource = {
-        HTML: 0,
-        WML: 1,
-        XML: 2,
-        JS: 3,
-        CSS: 4,
-        Other: 5
-    }
-    
-    var MessageType = {
-        Log: 0,
-        Object: 1,
-        Trace: 2,
-        StartGroup: 3,
-        StartGroupCollapsed: 4,
-        EndGroup: 5,
-        Assert: 6,
-        UncaughtException: 7,
-        Result: 8
-    }
-    
-    var MessageLevel = {
-        Tip: 0,
-        Log: 1,
-        Warning: 2,
-        Error: 3,
-        Debug: 4
-    }
-
-//-----------------------------------------------------------------------------
-static getter original
-    return OriginalConsole
-
-//-----------------------------------------------------------------------------
-static method useRemote(value)
-    if (arguments.length == 0) return UsingRemote
-    
-    var oldValue = UsingRemote
-    
-    UsingRemote = !!value
-    
-    if (UsingRemote) 
-        window.console = RemoteConsole
-    else
-        window.console = OriginalConsole
-        
-    return oldValue
-
-//-----------------------------------------------------------------------------
-method _generic(level, messageParts)
-    
-    var message = messageParts[0].toString()
-    
-    var parameters = []
-    for (var i=0; i<messageParts.length; i++) {
-        parameters.push(
-            Weinre.injectedScript.wrapObjectForConsole(messageParts[i], true)
-        )
-    }
-    
-    var payload = {
-        source:      MessageSource.JS,
-        type:        MessageType.Log,
-        level:       level,
-        message:     message,
-        parameters:  parameters
-    }
-    
-    Weinre.wi.ConsoleNotify.addConsoleMessage(payload)
-
-//-----------------------------------------------------------------------------
-method log
-    this._generic(MessageLevel.Log, [].slice.call(arguments)) 
-
-//-----------------------------------------------------------------------------
-method debug
-    this._generic(MessageLevel.Debug, [].slice.call(arguments)) 
-
-//-----------------------------------------------------------------------------
-method error
-    this._generic(MessageLevel.Error, [].slice.call(arguments)) 
-
-//-----------------------------------------------------------------------------
-method info
-    this._generic(MessageLevel.Log, [].slice.call(arguments)) 
-
-//-----------------------------------------------------------------------------
-method warn
-    this._generic(MessageLevel.Warning, [].slice.call(arguments)) 
-
-//-----------------------------------------------------------------------------
-method dir
-    Weinre.notImplemented(arguments.callee.signature)
-
-//-----------------------------------------------------------------------------
-method dirxml
-    Weinre.notImplemented(arguments.callee.signature)
-
-//-----------------------------------------------------------------------------
-method trace
-    Weinre.notImplemented(arguments.callee.signature)
-    
-//-----------------------------------------------------------------------------
-method assert(condition)
-    Weinre.notImplemented(arguments.callee.signature)
-    
-//-----------------------------------------------------------------------------
-method count
-    Weinre.notImplemented(arguments.callee.signature)
-    
-//-----------------------------------------------------------------------------
-method markTimeline(message)
-    Timeline.addRecord_Mark(message)
-    
-//-----------------------------------------------------------------------------
-method lastWMLErrorMessage
-    Weinre.notImplemented(arguments.callee.signature)
-
-//-----------------------------------------------------------------------------
-method profile(title)
-    Weinre.notImplemented(arguments.callee.signature)
-
-//-----------------------------------------------------------------------------
-method profileEnd(title)
-    Weinre.notImplemented(arguments.callee.signature)
-
-//-----------------------------------------------------------------------------
-method time(title)
-    Weinre.notImplemented(arguments.callee.signature)
-
-//-----------------------------------------------------------------------------
-method timeEnd(title)
-    Weinre.notImplemented(arguments.callee.signature)
-
-//-----------------------------------------------------------------------------
-method group
-    Weinre.notImplemented(arguments.callee.signature)
-
-//-----------------------------------------------------------------------------
-method groupCollapsed
-    Weinre.notImplemented(arguments.callee.signature)
-
-//-----------------------------------------------------------------------------
-method groupEnd
-    Weinre.notImplemented(arguments.callee.signature)


Mime
View raw message