let elem = document.getElementById('FindToolbar').getElement('findbar-textbox');
let DOMUtils = Components.classes["@mozilla.org/inspector/dom-utils;1"].
getService(Components.interfaces["inIDOMUtils"]);
let rules = DOMUtils.getCSSStyleRules(elem);
for (let i = 0; i < rules.Count(); i++) {
liberator.log(rules.GetElementAt(i));
}
(1)一個分
vimperator: [object CSSStyleRule]::
type: 1
cssText: .findbar-textbox[status="notfound"] { background-color: rgb(238, 102, 102); color: rgb(255, 255, 255); }
parentStyleSheet: [object CSSStyleSheet]
parentRule: null
selectorText: .findbar-textbox[status="notfound"]
style: [object CSSStyleDeclaration]
UNKNOWN_RULE: 0
STYLE_RULE: 1
CHARSET_RULE: 2
IMPORT_RULE: 3
MEDIA_RULE: 4
FONT_FACE_RULE: 5
PAGE_RULE: 6
(0)
vimperator: [xpconnect wrapped nsISupportsArray]::
QueryInterface: function QueryInterface() {
[native code]
}
read: function read() {
[native code]
}
write: function write() {
[native code]
}
Count: function Count() {
[native code]
}
GetElementAt: function GetElementAt() {
[native code]
}
QueryElementAt: function QueryElementAt() {
[native code]
}
SetElementAt: function SetElementAt() {
[native code]
}
AppendElement: function AppendElement() {
[native code]
}
RemoveElement: function RemoveElement() {
[native code]
}
Enumerate: function Enumerate() {
[native code]
}
Clear: function Clear() {
[native code]
}
GetIndexOf: function GetIndexOf() {
[native code]
}
GetIndexOfStartingAt: function GetIndexOfStartingAt() {
[native code]
}
GetLastIndexOf: function GetLastIndexOf() {
[native code]
}
DeleteLastElement: function DeleteLastElement() {
[native code]
}
DeleteElementAt: function DeleteElementAt() {
[native code]
}
Compact: function Compact() {
[native code]
}
clone: function clone() {
[native code]
}