blob: b70d9c594d6d7743799d8b681801ed4f18f306d0 [file] [log] [blame]
/*
* 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
*/
require ../common/Weinre
require ../common/Callback
require ./Console
//-----------------------------------------------------------------------------
//
//-----------------------------------------------------------------------------
class WeinreTargetEventsImpl
//-----------------------------------------------------------------------------
//
//-----------------------------------------------------------------------------
method connectionCreated(/*string*/ clientId, /*string*/ targetId)
var message = "weinre: target " + targetId + " connected to client " + clientId
console.log(message)
var oldValue = Console.useRemote(true)
if (!oldValue) {
console.log(message)
}
Weinre.target.setDocument()
//-----------------------------------------------------------------------------
//
//-----------------------------------------------------------------------------
method connectionDestroyed(/*string*/ clientId, /*string*/ targetId)
var message = "weinre: target " + targetId + " disconnected from client " + clientId
console.log(message)
var oldValue = Console.useRemote(false)
if (oldValue) {
console.log(message)
}
//-----------------------------------------------------------------------------
//
//-----------------------------------------------------------------------------
method sendCallback(/*int*/ callbackId, /*any*/ result)
Callback.invoke(callbackId, result)