This method removes a listener from the DHTML box. This listener should have been
previously added via the
addListener method.
function MyListener()
{
this.loadingStart = loadingStart;
function loadingStart()
{
shell.print("loadingStart");
}
this.loadingComplete = loadingComplete;
function loadingComplete()
{
shell.print("loadingComplete");
}
this.loadingError = loadingError;
function loadingError(errType)
{
shell.print("loadingError");
}
}
function onConstructed()
{
var browser = scene.getBoxById("browser");
if (browser)
{
gListener = new MyListener;
if (gListener)
{
browser.addListener(gListener);
}
}
}
function onDestroy()
{
if (gListener)
{
var browser = scene.getBoxById("browser");
if (browser)
{
browser.removeListener(gListener);
}
delete gListener;
gListener = null;
}
}