void SVGTRefElement::detachTarget() { // Remove active listeners and clear the text content. clearEventListener(); String emptyContent; ExceptionCode ignore = 0; ASSERT(hasShadowRoot()); Node* container = shadowTree()->oldestShadowRoot()->firstChild(); if (container) container->setTextContent(emptyContent, ignore); // Mark the referenced ID as pending. String id; SVGURIReference::targetElementFromIRIString(href(), document(), &id); if (!hasPendingResources() && !id.isEmpty()) document()->accessSVGExtensions()->addPendingResource(id, this); }
SVGTRefElement::~SVGTRefElement() { clearEventListener(); }