W3C home > Mailing lists > Public > www-style@w3.org > August 2013

RE: [css-om] CSSStyleDeclaration.parentElement

From: François REMY <francois.remy.dev@outlook.com>
Date: Fri, 23 Aug 2013 19:51:56 +0200
Message-ID: <DUB120-W6A9D2122366D46FF19E01A54E0@phx.gbl>
To: Simon Pieters <simonp@opera.com>, "www-style@w3.org" <www-style@w3.org>
> I'm not asking browser vendors to ship
> some new features, just to expose some
> information they already have access
> to.

Webkit:

  https://github.com/WebKit/webkit/blob/7b607cc39c67ddb2856e4618b42327f2982d3d15/Source/WebCore/css/CSSComputedStyleDeclaration.h#L68


Gecko:

  http://hg.mozilla.org/mozilla-central/file/edf8075b0333/layout/style/nsDOMCSSAttrDeclaration.h#l84


The only question that remains is what do you do for Pseudo-Elements. I quite remember there were discussions for exposing pseudo-elements has something really simple having a few "style" properties but it seems marked as At-Risk in the current spec (http://dev.w3.org/csswg/cssom/#the-pseudoelement-interface).

By the way, if I can make some suggestion, we should probably expose both "parentNode"/"parentElement" properties on a pseudo-element, as well as a "tagName"/"nodeName" whose value would be "::before" or "::after". Otherwise, you've no idea which pseudo-element you work with if you get a reference to one. 		 	   		  
Received on Friday, 23 August 2013 17:52:24 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:33 UTC