/** * Removes the scripting listeners from the given element. */ protected void removeScriptingListenersOn(Element elt) { String eltNS = elt.getNamespaceURI(); String eltLN = elt.getLocalName(); if (SVGConstants.SVG_NAMESPACE_URI.equals(eltNS) && SVG12Constants.SVG_HANDLER_TAG.equals(eltLN)) { // For this 'handler' element, remove the handler for the given // event type. AbstractElement tgt = (AbstractElement) elt.getParentNode(); String eventType = elt.getAttributeNS (XMLConstants.XML_EVENTS_NAMESPACE_URI, XMLConstants.XML_EVENTS_EVENT_ATTRIBUTE); String eventNamespaceURI = XMLConstants.XML_EVENTS_NAMESPACE_URI; if (eventType.indexOf(':') != -1) { String prefix = DOMUtilities.getPrefix(eventType); eventType = DOMUtilities.getLocalName(eventType); eventNamespaceURI = ((AbstractElement) elt).lookupNamespaceURI(prefix); } EventListener listener = (EventListener) handlerScriptingListeners.put (eventNamespaceURI, eventType, elt, null); tgt.removeEventListenerNS (eventNamespaceURI, eventType, listener, false); } super.removeScriptingListenersOn(elt); }
/** * Removes the scripting listeners from the given element. */ protected void removeScriptingListenersOn(Element elt) { String eltNS = elt.getNamespaceURI(); String eltLN = elt.getLocalName(); if (SVGConstants.SVG_NAMESPACE_URI.equals(eltNS) && SVG12Constants.SVG_HANDLER_TAG.equals(eltLN)) { // For this 'handler' element, remove the handler for the given // event type. AbstractElement tgt = (AbstractElement) elt.getParentNode(); String eventType = elt.getAttributeNS (XMLConstants.XML_EVENTS_NAMESPACE_URI, XMLConstants.XML_EVENTS_EVENT_ATTRIBUTE); String eventNamespaceURI = XMLConstants.XML_EVENTS_NAMESPACE_URI; if (eventType.indexOf(':') != -1) { String prefix = DOMUtilities.getPrefix(eventType); eventType = DOMUtilities.getLocalName(eventType); eventNamespaceURI = ((AbstractElement) elt).lookupNamespaceURI(prefix); } EventListener listener = (EventListener) handlerScriptingListeners.put (eventNamespaceURI, eventType, elt, null); tgt.removeEventListenerNS (eventNamespaceURI, eventType, listener, false); } super.removeScriptingListenersOn(elt); }
eventType = DOMUtilities.getLocalName(eventType); eventNamespaceURI = ((AbstractElement) elt).lookupNamespaceURI(prefix);
eventType = DOMUtilities.getLocalName(eventType); eventNamespaceURI = ((AbstractElement) elt).lookupNamespaceURI(prefix);
if (ens != null) { String eprefix = e.getPrefix(); if (!compareStrings(ae.lookupNamespaceURI(eprefix), ens)) { e.setAttributeNS (XMLConstants.XMLNS_NAMESPACE_URI, if (ae.lookupNamespaceURI(null) == null) { e.setAttributeNS (XMLConstants.XMLNS_NAMESPACE_URI, continue; String aprens = apre == null ? null : ae.lookupNamespaceURI(apre); if (apre == null || aprens == null } else { if (apre != null && ae.lookupNamespaceURI(apre) == null) { e.setAttributeNS (XMLConstants.XMLNS_NAMESPACE_URI,
if (ens != null) { String eprefix = e.getPrefix(); if (!compareStrings(ae.lookupNamespaceURI(eprefix), ens)) { e.setAttributeNS (XMLConstants.XMLNS_NAMESPACE_URI, if (ae.lookupNamespaceURI(null) == null) { e.setAttributeNS (XMLConstants.XMLNS_NAMESPACE_URI, continue; String aprens = apre == null ? null : ae.lookupNamespaceURI(apre); if (apre == null || aprens == null } else { if (apre != null && ae.lookupNamespaceURI(apre) == null) { e.setAttributeNS (XMLConstants.XMLNS_NAMESPACE_URI,
if (ens != null) { String eprefix = e.getPrefix(); if (!compareStrings(ae.lookupNamespaceURI(eprefix), ens)) { e.setAttributeNS (XMLConstants.XMLNS_NAMESPACE_URI, if (ae.lookupNamespaceURI(null) == null) { e.setAttributeNS (XMLConstants.XMLNS_NAMESPACE_URI, continue; String aprens = apre == null ? null : ae.lookupNamespaceURI(apre); if (apre == null || aprens == null } else { if (apre != null && ae.lookupNamespaceURI(apre) == null) { e.setAttributeNS (XMLConstants.XMLNS_NAMESPACE_URI,