This page has been flagged with the following issues:
Inherits from SVGElement
Inherited from SVGElement
Note: In addition to the attributes, properties, events, methods, and styles listed above, SVG elements also inherent core HTML attributes, properties, events, methods, and styles.
If the use element references a simple graphics element such as rect, there is only one SVGElementInstance object, and the correspondingElement attribute on this SVGElementInstance object is the SVGRectElement that corresponds to the referenced rect element.
If the use element references a g element that contains two rect elements, the instance tree contains three SVGElementInstance objects: a root SVGElementInstance object whose correspondingElement attribute is the SVGGElement object for the g element, and then two child SVGElementInstance objects that have their correspondingElement attribute that is an SVGRectElement object.
If the referenced object is a use element, or if there are use subelements within the referenced object, the instance tree contains a recursive expansion of the indirect references to form a complete tree. For example, if a use element references a g element, and the g element contains a use element, and that use element references a rect element, the instance tree for the original (outermost) use consists of a hierarchy of SVGElementInstance objects, as follows:
SVGElementInstance #1 (parentNode=null, firstChild=#2, correspondingElement is the 'g') SVGElementInstance #2 (parentNode=#1, firstChild=#3, correspondingElement is the other 'use') SVGElementInstance #3 (parentNode=#2, firstChild=null, correspondingElement is the 'rect')
- Scalable Vector Graphics: Document Structure, Section 5.11.9
The SVGElementInstance object has these methods:
- addEventListener: Registers an event listener
- dispatchEvent: Dispatches an event to an object.
- removeEventListener: Removes an event listener.
The SVGElementInstance object has these properties:
- childNodes: Gets an SVGElementInstanceList object that contains all children of this SVGElementInstance object within the instance tree.
- correspondingElement: Gets the corresponding element that this object is an instance of.
- correspondingUseElement: Gets the corresponding use element that this object belongs to.
- firstChild: Gets the first child of this SVGElementInstance object in the instance tree.
- lastChild: Gets the last child of this SVGElementInstance object in the instance tree.
- nextSibling: Gets the SVGElementInstance object that immediately follows this SVGElementInstance object.
- parentNode: Gets the parent of this SVGElementInstance object within the instance tree.
- previousSibling: Gets the SVGElementInstance object that immediately precedes this SVGElementInstance object.
This article contains content originally from external sources.
Portions of this content come from the Microsoft Developer Network: [Windows Internet Explorer API reference Article]