This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 14207 - ElementCSSInlineStyle needs binding to Element
Summary: ElementCSSInlineStyle needs binding to Element
Status: RESOLVED FIXED
Alias: None
Product: CSS
Classification: Unclassified
Component: CSSOM (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Simon Pieters
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-19 02:07 UTC by Glenn Adams
Modified: 2013-08-08 13:26 UTC (History)
4 users (show)

See Also:


Attachments

Description Glenn Adams 2011-09-19 02:07:57 UTC
the (incomplete) definition of ElementCSSInlineStyle (see 7.1) does not specify that an object that implements the Element interface must also implement ElementCSSInlineStyle;

need to add normative text specifying:

Element implements ElementCSSInlineStyle;
Comment 1 Anne 2011-09-19 08:04:01 UTC
Neh, it should become "partial Element" instead.
Comment 2 Glenn Adams 2011-09-19 08:24:38 UTC
(In reply to comment #1)
> Neh, it should become "partial Element" instead.

ok, that works for me
Comment 3 Boris Zbarsky 2011-09-21 03:05:29 UTC
Except not all elements implement ElementCSSInlineStyle.  In particular, not all SVG elements have a .style per current SVG spec.
Comment 4 Glenn Adams 2011-09-21 03:12:51 UTC
(In reply to comment #3)
> Except not all elements implement ElementCSSInlineStyle.  In particular, not
> all SVG elements have a .style per current SVG spec.

good point; perhaps it is best specified as

HTMLElement implements ElementCSSInlineStyle

or as

partial HTMLElement {}

though personally I do not like the use of partial, since it does not permit one to identify the collection of new members being added, and does not support instanceof (or equivalent) operator
Comment 5 Boris Zbarsky 2011-09-21 03:18:50 UTC
If we want .style to appear on the mixin prototype object, we use "implements".

If we want it to appear on HTMLElement.prototype, we use "partial".

In neither case would "document.createElement("div") instanceof ElementCSSInlineStyle" return true, if I read webidl correctly.

I would personally be reasonably OK with trying to push .style up to Element if the SVG folks are OK with it...
Comment 6 Simon Pieters 2013-05-21 18:27:25 UTC
My thinking is that HTML and SVG should say HTMLElement implements ElementCSSInlineStyle and SVGElement implements ElementCSSInlineStyle.

If we make it work on Element, should we make style="" work on any element as well?
Comment 7 Simon Pieters 2013-06-11 22:15:06 UTC
https://dvcs.w3.org/hg/csswg/rev/ca20cc414744