SVGSVGElement
This object is available to unprivileged JavaScript. It implements the following interfaces:
- nsIDOMEventTarget
- nsIDOMSVGElement
- nsIDOMSVGFitToViewBox
- nsIDOMSVGLocatable
- nsIDOMSVGSVGElement
- nsIDOMSVGStylable
- nsIDOMSVGZoomAndPan
Constants
| The nsIDOMNode interface is the primary datatype for the entire
Document Object Model.
It represents a single node in the document tree.
For more information on this interface please see http://www.w3.org/TR/DOM-Level-2-Core/ | ||
| short | ELEMENT_NODE | = 1 |
| short | ATTRIBUTE_NODE | = 2 |
| short | TEXT_NODE | = 3 |
| short | CDATA_SECTION_NODE | = 4 |
| short | ENTITY_REFERENCE_NODE | = 5 |
| short | ENTITY_NODE | = 6 |
| short | PROCESSING_INSTRUCTION_NODE | = 7 |
| short | COMMENT_NODE | = 8 |
| short | DOCUMENT_NODE | = 9 |
| short | DOCUMENT_TYPE_NODE | = 10 |
| short | DOCUMENT_FRAGMENT_NODE | = 11 |
| short | NOTATION_NODE | = 12 |
| short | SVG_ZOOMANDPAN_UNKNOWN | = 0 |
| short | SVG_ZOOMANDPAN_DISABLE | = 1 |
| short | SVG_ZOOMANDPAN_MAGNIFY | = 2 |
Properties
readonly NamedNodeMap attributes
readonly NodeList childNodes
readonly nsIDOMSVGAnimatedString className
String contentScriptType
String contentStyleType
float currentScale
readonly nsIDOMSVGPoint currentTranslate
readonly nsIDOMSVGViewSpec currentView
readonly nsIDOMSVGElement farthestViewportElement
readonly Node firstChild
readonly nsIDOMSVGAnimatedLength height
String id
readonly Node lastChild
readonly String localName
readonly String namespaceURI
readonly nsIDOMSVGElement nearestViewportElement
readonly Node nextSibling
readonly String nodeName
readonly short nodeType
String nodeValue
readonly Document ownerDocument
readonly nsIDOMSVGSVGElement ownerSVGElement
readonly Node parentNode
readonly float pixelUnitToMillimeterX
readonly float pixelUnitToMillimeterY
String prefix
readonly nsIDOMSVGAnimatedPreserveAspectRatio preserveAspectRatio
readonly Node previousSibling
readonly float screenPixelToMillimeterX
readonly float screenPixelToMillimeterY
readonly CSSStyleDeclaration style
readonly String tagName
The nsIDOMElement interface represents an element in an HTML or XML document.
For more information on this interface please see http://www.w3.org/TR/DOM-Level-2-Core/
boolean useCurrentView
readonly nsIDOMSVGAnimatedRect viewBox
readonly nsIDOMSVGRect viewport
readonly nsIDOMSVGElement viewportElement
readonly nsIDOMSVGAnimatedLength width
readonly nsIDOMSVGAnimatedLength x
readonly nsIDOMSVGAnimatedLength y
short zoomAndPan
Methods
void addEventListener ( String type , EventListener listener , boolean useCapture )
boolean animationsPaused ( )
Node appendChild ( Node newChild )
boolean checkEnclosure ( nsIDOMSVGElement element , nsIDOMSVGRect rect )
boolean checkIntersection ( nsIDOMSVGElement element , nsIDOMSVGRect rect )
Node cloneNode ( boolean deep )
nsIDOMSVGAngle createSVGAngle ( )
nsIDOMSVGLength createSVGLength ( )
nsIDOMSVGMatrix createSVGMatrix ( )
nsIDOMSVGNumber createSVGNumber ( )
nsIDOMSVGPoint createSVGPoint ( )
nsIDOMSVGRect createSVGRect ( )
String createSVGString ( )
nsIDOMSVGTransform createSVGTransform ( )
nsIDOMSVGTransform createSVGTransformFromMatrix ( nsIDOMSVGMatrix matrix )
void deSelectAll ( )
boolean dispatchEvent ( Event evt )
void forceRedraw ( )
String getAttribute ( String name )
Attr getAttributeNode ( String name )
Attr getAttributeNodeNS ( String namespaceURI , String localName )
String getAttributeNS ( String namespaceURI , String localName )
nsIDOMSVGRect getBBox ( )
nsIDOMSVGMatrix getCTM ( )
float getCurrentTime ( )
Element getElementById ( String elementId )
NodeList getElementsByTagName ( String name )
NodeList getElementsByTagNameNS ( String namespaceURI , String localName )
NodeList getEnclosureList ( nsIDOMSVGRect rect , nsIDOMSVGElement referenceElement )
NodeList getIntersectionList ( nsIDOMSVGRect rect , nsIDOMSVGElement referenceElement )
CSSValue getPresentationAttribute ( String name )
nsIDOMSVGMatrix getScreenCTM ( )
nsIDOMSVGMatrix getTransformToElement ( nsIDOMSVGElement element )
nsIDOMSVGMatrix getViewboxToViewportTransform ( )
boolean hasAttribute ( String name )
boolean hasAttributeNS ( String namespaceURI , String localName )
boolean hasAttributes ( )
boolean hasChildNodes ( )
Node insertBefore ( Node newChild , Node refChild )
boolean isSupported ( String feature , String version )
void normalize ( )
void pauseAnimations ( )
void removeAttribute ( String name )
Attr removeAttributeNode ( Attr oldAttr )
void removeAttributeNS ( String namespaceURI , String localName )
Node removeChild ( Node oldChild )
void removeEventListener ( String type , EventListener listener , boolean useCapture )
Node replaceChild ( Node newChild , Node oldChild )
void setAttribute ( String name , String value )
Attr setAttributeNode ( Attr newAttr )
Attr setAttributeNodeNS ( Attr newAttr )
void setAttributeNS ( String namespaceURI , String qualifiedName , String value )
void setCurrentTime ( float seconds )
int suspendRedraw ( int max_wait_milliseconds )
void unpauseAnimations ( )
void unsuspendRedraw ( int suspend_handle_id )
void unsuspendRedrawAll ( )
void addEventListener ( String type , EventListener listener , boolean useCapture )
This method allows the registration of event listeners on the event target. If an EventListener is added to an EventTarget while it is processing an event, it will not be triggered by the current actions but may be triggered during a later stage of event flow, such as the bubbling phase.
If multiple identical EventListeners are registered on the same EventTarget with the same parameters the duplicate instances are discarded. They do not cause the EventListener to be called twice and since they are discarded they do not need to be removed with the removeEventListener method.
- Arguments:
- type: The event type for which the user is registering
- listener: The listener parameter takes an interface implemented by the user which contains the methods to be called when the event occurs.
- useCapture: If true, useCapture indicates that the user wishes to initiate capture. After initiating capture, all events of the specified type will be dispatched to the registered EventListener before being dispatched to any EventTargets beneath them in the tree. Events which are bubbling upward through the tree will not trigger an EventListener designated to use capture.
boolean checkEnclosure ( nsIDOMSVGElement element , nsIDOMSVGRect rect )
- Arguments:
- element
- rect
boolean checkIntersection ( nsIDOMSVGElement element , nsIDOMSVGRect rect )
- Arguments:
- element
- rect
Node cloneNode ( boolean deep )
- Arguments:
- deep
nsIDOMSVGAngle createSVGAngle ( )
nsIDOMSVGLength createSVGLength ( )
nsIDOMSVGMatrix createSVGMatrix ( )
nsIDOMSVGNumber createSVGNumber ( )
nsIDOMSVGPoint createSVGPoint ( )
nsIDOMSVGRect createSVGRect ( )
nsIDOMSVGTransform createSVGTransform ( )
nsIDOMSVGTransform createSVGTransformFromMatrix ( nsIDOMSVGMatrix matrix )
- Arguments:
- matrix
boolean dispatchEvent ( Event evt )
This method allows the dispatch of events into the implementations event model. Events dispatched in this manner will have the same capturing and bubbling behavior as events dispatched directly by the implementation. The target of the event is the EventTarget on which dispatchEvent is called.
- Arguments:
- evt: Specifies the event type, behavior, and contextual information to be used in processing the event.
- Returns:
- Indicates whether any of the listeners which handled the event called preventDefault. If preventDefault was called the value is false, else the value is true.
Attr getAttributeNode ( String name )
- Arguments:
- name
Attr getAttributeNodeNS ( String namespaceURI , String localName )
- Arguments:
- namespaceURI
- localName
nsIDOMSVGRect getBBox ( )
nsIDOMSVGMatrix getCTM ( )
Element getElementById ( String elementId )
- Arguments:
- elementId
NodeList getElementsByTagName ( String name )
- Arguments:
- name
NodeList getElementsByTagNameNS ( String namespaceURI , String localName )
- Arguments:
- namespaceURI
- localName
NodeList getEnclosureList ( nsIDOMSVGRect rect , nsIDOMSVGElement referenceElement )
- Arguments:
- rect
- referenceElement
NodeList getIntersectionList ( nsIDOMSVGRect rect , nsIDOMSVGElement referenceElement )
- Arguments:
- rect
- referenceElement
CSSValue getPresentationAttribute ( String name )
- Arguments:
- name
nsIDOMSVGMatrix getScreenCTM ( )
nsIDOMSVGMatrix getTransformToElement ( nsIDOMSVGElement element )
- Arguments:
- element
nsIDOMSVGMatrix getViewboxToViewportTransform ( )
void removeEventListener ( String type , EventListener listener , boolean useCapture )
This method allows the removal of event listeners from the event target. If an EventListener is removed from an EventTarget while it is processing an event, it will not be triggered by the current actions. EventListeners can never be invoked after being removed. Calling removeEventListener with arguments which do not identify any currently registered EventListener on the EventTarget has no effect.
- Arguments:
- type: Specifies the event type of the EventListener being removed.
- listener: The EventListener parameter indicates the EventListener to be removed.
- useCapture: Specifies whether the EventListener being removed was registered as a capturing listener or not. If a listener was registered twice, one with capture and one without, each must be removed separately. Removal of a capturing listener does not affect a non-capturing version of the same listener, and vice versa.
void setAttributeNS ( String namespaceURI , String qualifiedName , String value )
- Arguments:
- namespaceURI
- qualifiedName
- value
Reference documentation is generated from Mozilla's source.
