nsISupports
Last changed in Gecko 22.0 (Firefox 22.0 / Thunderbird 22.0 / SeaMonkey 2.19)Implemented by: @mozilla.org/inspector/dom-utils;1
as a service:
var inIDOMUtils = Components.classes["@mozilla.org/inspector/dom-utils;1"] .getService(Components.interfaces.inIDOMUtils);
void addPseudoClassLock(in nsIDOMElement aElement, in DOMString aPseudoClass); |
void clearPseudoClassLocks(in nsIDOMElement aElement); |
[implicit_jscontext] jsval colorNameToRGB(in DOMString aColorName); |
nsIArray getBindingURLs(in nsIDOMElement aElement); |
nsIDOMNodeList getChildrenForNode(in nsIDOMNode aNode, in boolean aShowingAnonymousContent); |
unsigned long long getContentState(in nsIDOMElement aElement); |
void getCSSPropertyNames([optional] in unsigned long aFlags, [optional] out unsigned long aCount, [retval, array, size_is(aCount)] out wstring aProps); |
nsISupportsArray getCSSStyleRules(in nsIDOMElement aElement, [optional] in DOMString aPseudo); |
nsIDOMNode getParentForNode(in nsIDOMNode aNode, in boolean aShowingAnonymousContent); |
unsigned long getRuleLine(in nsIDOMCSSStyleRule aRule); |
unsigned long getRuleColumn(in nsIDOMCSSStyleRule aRule); |
unsigned long getSelectorCount(in nsIDOMCSSStyleRule aRule); |
AString getSelectorText(in nsIDOMCSSStyleRule aRule, in unsigned long aSelectorIndex); |
unsigned long long getSpecificity(in nsIDOMCSSStyleRule aRule, in unsigned long aSelectorIndex); |
nsIDOMFontFaceList getUsedFontFaces(in nsIDOMRange aRange); |
bool hasPseudoClassLock(in nsIDOMElement aElement, in DOMString aPseudoClass); |
boolean isIgnorableWhitespace(in nsIDOMCharacterData aDataNode); |
bool isInheritedProperty(in AString aPropertyName); |
void parseStyleSheet(in nsIDOMCSSStyleSheet aSheet, in DOMString aInput); |
void removePseudoClassLock(in nsIDOMElement aElement, in DOMString aPseudoClass); |
AString rgbToColorName(in octet aR, in octet aG, in octet aB); |
bool selectorMatchesElement(in nsIDOMElement aElement, in nsIDOMCSSStyleRule aRule, in unsigned long aSelectorIndex, [optional] in DOMString aPseudo); |
void setContentState(in nsIDOMElement aElement, in unsigned long long aState); |
Constant | Value | Description |
EXCLUDE_SHORTHANDS |
(1<<0) |
|
INCLUDE_ALIASES |
(1<<1) |
The content state flags are used in a bitmask.
Value | State |
1 | :active |
2 | :focus |
4 | :hover |
8 | :-moz-drag-over |
16 | :target |
1<<29 | :-moz-focusring |
Returns an array of nsIURI
objects representing the current XML binding for the specified element.
nsIArray getBindingURLs( in nsIDOMElement aElement );
aElement
An array of nsIURI
objects representing the current XBL binding (if any) for the element and its hierarchy of base bindings.
Returns a list of DOM nodes that are children of the specified node.
nsIDOMNodeList getChildrenForNode( in nsIDOMNode aNode, in boolean aShowingAnonymousContent );
aNode
Node
for which to retrieve the style nodes.aShowingAnonymousContent
A DOM NodeList
of the child nodes. If you have requested anonymous content, then if the element has an XBL binding then this will be the binding's anonymous nodes, otherwise if the element is itself an anonymous node containing an insertion point then this will be a list combining the element's explicit children from its binding parent's anonymous nodes and any children inserted as a result of the insertion point.
A bit mask of the supported content state flags, which are listed in Content state flags.
unsigned long long getContentState( in nsIDOMElement aElement );
aElement
A bitmask of one of the 6 supported content state flags specified in Content state flags.
Get a list of all our supported property names
void getCSSPropertyNames( in unsigned long aFlags, Optional out unsigned long aCount, Optional [retval, array, size_is(aCount)] out wstring aProps );
aFlags
OptionalaCount
OptionalaProps
Returns an array of the CSS style rules on the specified element
.
nsISupportsArray getCSSStyleRules(
in nsIDOMElement aElement,
in DOMString aPseudo Optional
);
aElement
element
to retrieve the style rules of.aPseudo
Optional before
.An nsISupportsArray
containing all the style rules that currently apply to the element, in ascending order of weight.
Returns the parent of the specified node
.
nsIDOMNode getParentForNode( in nsIDOMNode aNode, in boolean aShowingAnonymousContent );
aNode
aShowingAnonymousContent
Returns the parent of a node. The parent of a document node is the frame/iframe containing that document. If you have requested anonymous content and the element's parent has an XBL binding then the element containing the insertion point is returned instead.
Returns the line number of the specified CSS style rule in its source file.
unsigned long getRuleLine( in nsIDOMCSSStyleRule aRule );
aRule
The line number of the style rule; the URL of the rule can be obtained from its parent style sheet object.
Returns the column number of the specified CSS style rule in its source file.
unsigned long getRuleColumn( in nsIDOMCSSStyleRule aRule );
aRule
The column number of the style rule; the URL of the rule can be obtained from its parent style sheet object.
Returns a list of the fonts specified using @font-face
in the specified portion of the document.
nsIDOMFontFaceList getUsedFontFaces( in nsIDOMRange aRange );
aRange
range
to retrieve the font faces of.An nsIDOMFontFaceList
object listing all the font faces used by the text in the range.
Determines if the specified text node contains only ignorable whitespace characters.
boolean isIgnorableWhitespace( in nsIDOMCharacterData aDataNode );
aDataNode
CharacterData
node; that is, a text node.true
if the node only contains insignificant whitespace. In particular, this will be false
if certain CSS white-space styles are in effect.
Determines if the specified string names a CSS property that is inherited by default.
boolean isInheritedProperty( in AString aPropertyName );
aPropertyName
true
if the property is inherited, otherwise false
.
Parse CSS and update the style sheet in place.
void parseStyleSheet( in nsIDOMCSSStyleSheet aSheet, in DOMString aInput );
aSheet
DOMCSSStyleSheet
.aInput
DOMString
. The new source string for the style sheet.void
Sets the given element
as the current owner of the specified state, and removes that state from the previous owner.
void setContentState( in nsIDOMElement aElement, in unsigned long long aState );
aElement
aState
Checks if a given selector from a style rule matches an element
.
bool selectorMatchesElement (
in nsIDOMElement aElement,
in nsIDOMCSSStyleRule aRule,
in unsigned long aSelectorIndex,
in DOMString aPseudo Optional
)
aElement
aRule
aSelectorIndex
aPseudo
Optional Makes the element
take on style properties that would apply if the element had the given pseudo-classes
.
void addPseudoClassLock( in nsIDOMElement aElement, in DOMString aPseudoClass );
aElement
aPseudoClass
Removes a pseudo-class lock from the element
.
void removePseudoClassLock( in nsIDOMElement aElement, in DOMString aPseudoClass );
aElement
aPseudoClass
Checks whether the element
element has a particular pseudo-class lock applied.
boolean hasPseudoClassLock( in nsIDOMElement aElement, in DOMString aPseudoClass );
aElement
aPseudoClass
true if lock exists, false otherwise
Removes any pseudo-class locks from the element
.
void clearPseudoClassLocks( in nsIDOMElement aElement );
aElement