RESOLVED WONTFIX 23278
Implement document.createStyleSheet()
https://bugs.webkit.org/show_bug.cgi?id=23278
Summary Implement document.createStyleSheet()
Antoine Quint
Reported 2009-01-12 15:27:35 PST
Currently, WebKit already supports the creation of a CSSStyleSheet by calling document.implementation.createCSSStyleSheet(), which is the DOM standard way to do it. However, once a CSSStyleSheet is created, there is no way to associate it with a document. StyleSheetList is read-only, and the create CSSStyleSheet has no .href that could be used to insert a <link> or @import rule in the document. Internet Explorer has an extension that would solve this, with the document.createStyleSheet() method http://msdn.microsoft.com/en-us/library/ms531194(VS.85).aspx
Attachments
Ahmad Saleem
Comment 1 2022-08-10 10:59:55 PDT
I think this is replaced by CSSStyleSheet: https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleSheet It was IE specific and it was removed in IE11: https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/dev-guides/bg182625(v=vs.85)?redirectedfrom=MSDN Further, I took a sample from Internet and changed it into JSFiddle: https://jsfiddle.net/qoLf5yme/ All browsers (Chrome Canary 106, Firefox Nightly 105 and Safari 15.6) show "document.createStyleSheet is not a function". I am going to mark this as "RESOLVED WONTFIX". Thanks!
Note You need to log in before you can comment on or make changes to this bug.