nsIDOMCSSStyleSheet.getCssRules()
said <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.dom |
|---|---|
| Organization | http://groups.google.com |
| Message-ID | <7d463229-5f71-4a34-94ab-de20c9a0ce21@s20g2000vbp.googlegroups.com> |
Hello,
I try to call the methode getCssRules() but it keeps returning an
error.
I call it using queryInterface over every item in
nsIDOMStyleSheetList; here is the code :
for (int i = 0; i < getStyleSheets().getLength(); i++) {
nsIDOMStyleSheet domStyleSheet = documentStyle
.getStyleSheets().item(i);
nsIDOMCSSStyleSheet cssStyleSheet = null;
try {
cssStyleSheet = (nsIDOMCSSStyleSheet)
documentStyle.getStyleSheets()
.item
(i)
.queryInterface(
nsIDOMCSSStyleSheet.NS_IDOMCSSSTYLESHEET_IID);
} catch (XPCOMException e) {}
System.out.println("CSSStyleSheet : "
+ cssStyleSheet.getCssRules().item(i));
}
}
but it keeps returning the following error :
The function "cssRules" returned an error condition (0x805303e8)
at org.mozilla.xpcom.internal.XPCOMJavaProxy.callXPCOMMethod(Native
Method)
is this the right way to do it or am I missing something?