if (r != null)
gn.setBackgroundEnable(r);
if (l != null) {
// Remove event listeners
EventTarget target = l.target;
target.removeEventListener("DOMAttrModified", l, true);
target.removeEventListener("DOMNodeInserted", l, true);
target.removeEventListener("DOMNodeRemoved", l, true);
target.removeEventListener("DOMCharacterDataModified",l, true);
l = null;
}
///////////////////////////////////////////////////////////////////////
// Handle mutations on content referenced in the same file if
// we are in a dynamic context.
if (isLocal && ctx.isDynamic()) {
l = new ReferencedElementMutationListener();
EventTarget target = (EventTarget)refElement;
l.target = target;
target.addEventListener("DOMAttrModified", l, true);
theCtx.storeEventListener(target, "DOMAttrModified", l, true);
target.addEventListener("DOMNodeInserted", l, true);
theCtx.storeEventListener(target, "DOMNodeInserted", l, true);
target.addEventListener("DOMNodeRemoved", l, true);
theCtx.storeEventListener(target, "DOMNodeRemoved", l, true);
target.addEventListener("DOMCharacterDataModified", l, true);
theCtx.storeEventListener
(target, "DOMCharacterDataModified", l, true);
}
return gn;