<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>23278</bug_id>
          
          <creation_ts>2009-01-12 15:27:35 -0800</creation_ts>
          <short_desc>Implement document.createStyleSheet()</short_desc>
          <delta_ts>2022-08-10 11:00:03 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Antoine Quint">ml</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>ap</cc>
    
    <cc>bfulgham</cc>
    
    <cc>rniwa</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>105408</commentid>
    <comment_count>0</comment_count>
    <who name="Antoine Quint">ml</who>
    <bug_when>2009-01-12 15:27:35 -0800</bug_when>
    <thetext>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 &lt;link&gt; 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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1890351</commentid>
    <comment_count>1</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-08-10 10:59:55 -0700</bug_when>
    <thetext>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 &quot;document.createStyleSheet is not a function&quot;. I am going to mark this as &quot;RESOLVED WONTFIX&quot;. Thanks!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>