> On Jan 13, 2015, at 3:46 PM, Brian Kardell <bkard...@gmail.com> wrote: > > > > On Tue, Jan 13, 2015 at 2:07 PM, Ryosuke Niwa <rn...@apple.com > <mailto:rn...@apple.com>> wrote: > > To separate presentational information (CSS) from the semantics (HTML). > Defining both style isolation boundaries and the associated CSS rules in an > external CSS file will allow authors to change both of them without having to > modify every HTML documents that includes the CSS file. Of course, this is a > non-starter for Web apps that require a lot of scripting, but style isolation > is a very useful feature for a lot of static pages as well. > > - R. Niwa > > > Ryosuke, > > Should you also be able to do this from JavaScript/DOM in your opinion? > Like, forget shadow dom as it is today in chrome or proposed -- should you be > able to do something like > > ``` > element.isolateTree = true; > ``` > > and achieve a similar effect? If not, why specifically?
Or element.setAttribute('isolatetree', true); I can't think of a reason not to do this. - R. Niwa