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

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>19995</bug_id>
          
          <creation_ts>2012-11-18 06:41:21 +0000</creation_ts>
          <short_desc>StyleSheet interface should have a &quot;scoped&quot; IDL attribute</short_desc>
          <delta_ts>2013-08-08 13:26:55 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>CSS</product>
          <component>CSSOM</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</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>
          <dependson>19874</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Cameron McCormack">cam</reporter>
          <assigned_to name="Simon Pieters">zcorpan</assigned_to>
          <cc>zcorpan</cc>
          
          <qa_contact>public-css-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>78448</commentid>
    <comment_count>0</comment_count>
    <who name="Cameron McCormack">cam</who>
    <bug_when>2012-11-18 06:41:21 +0000</bug_when>
    <thetext>I think it would be good to reflect in a StyleSheet object whether it is scoped to an element (via a scoped=&quot;&quot; attribute on a &lt;style&gt; element).  Might also be worth exposing what the scope root is.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78454</commentid>
    <comment_count>1</comment_count>
    <who name="Glenn Adams">glenn</who>
    <bug_when>2012-11-18 15:35:06 +0000</bug_when>
    <thetext>Needs to be coordinated with bug 19874.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89956</commentid>
    <comment_count>2</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2013-06-27 13:41:57 +0000</bug_when>
    <thetext>Can you elaborate on the use case(s), please?

It&apos;s possible to find this out already, something like

StyleSheet.prototype.isScoped = function() {
  return this.ownerNode &amp;&amp; !!this.ownerNode.scoped;
};

StyleSheet.prototype.scopedElement = function() {
  if (this.isScoped()) {
    return this.ownerNode.parentElement;
  }
};

This isn&apos;t fool-proof, but probably good enough. Since scoped style sheets aren&apos;t widely implemented yet, I think it&apos;s a bit premature to add this to CSSOM. Let&apos;s revisit this when scoped style sheets are widely implemented and used.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89986</commentid>
    <comment_count>3</comment_count>
    <who name="Cameron McCormack">cam</who>
    <bug_when>2013-06-28 00:50:42 +0000</bug_when>
    <thetext>I am not sure what use case I had in mind when I filed the bug. :)  I didn&apos;t know about ownerNode.  Having .scoped on the StyleSheet object is not so necessary given that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89994</commentid>
    <comment_count>4</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2013-06-28 07:48:07 +0000</bug_when>
    <thetext>OK, then I&apos;ll mark this as WONTFIX. Feel free to reopen if anyone comes up with a use case.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>