Create CSSStyleDeclaration object

Mike5 <[email protected]>
Newsgroups gmane.comp.mozilla.devel.dom
Organization http://groups.google.com
Message-ID <[email protected]>
I hope I am in the right newsgroup, but I am having problems with DOM
at the moment.

Background:
Because of the apparent Firefox bug with XHTML and tag character case,
I have a problem with binding XBL to tags. E.g.:

Works:
CSS: ns|customtag { style... }
XHTML: <ns:customtag>

Doesn't work:
CSS: ns|customTag { style... }
XHTML: <ns:customTag>

(!!!note the capital "T"!!!)

Workaround that I thought of:
From my extension append a script to "DOMContentLoaded" event, and
attach the binding to all the elements I'm insterested in.

But another problem appears. These elements do not have a style
property. So I am searching for a way to create one, so I can then
change element.style.MozBinding property.

element.style=new CSSStyleDeclaration();

does not work. I get "Error: Cannot convert WrappedNative to function
= NS_ERROR_XPC_CANT_CONVERT_WN_TO_FUN"

Any help would be greatly appreciated.

Thanks in advance and best regards, Miha
_______________________________________________
dev-tech-dom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-dom
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.