[Bug 19995] StyleSheet interface should have a "scoped" IDL attribute

https://www.w3.org/Bugs/Public/show_bug.cgi?id=19995

Simon Pieters <simonp@opera.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |simonp@opera.com
         Resolution|---                         |LATER

--- Comment #2 from Simon Pieters <simonp@opera.com> ---
Can you elaborate on the use case(s), please?

It's possible to find this out already, something like

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

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

This isn't fool-proof, but probably good enough. Since scoped style sheets
aren't widely implemented yet, I think it's a bit premature to add this to
CSSOM. Let's revisit this when scoped style sheets are widely implemented and
used.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Thursday, 27 June 2013 13:41:59 UTC