- From: <bugzilla@jessica.w3.org>
- Date: Wed, 29 Feb 2012 20:57:19 +0000
- To: public-html@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=16169
Summary: Define the CSSElementMap
Product: HTML WG
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: HTML5 spec (editor: Ian Hickson)
AssignedTo: ian@hixie.ch
ReportedBy: jackalmage@gmail.com
QAContact: public-html-bugzilla@w3.org
CC: mike@w3.org, public-html-wg-issue-tracking@w3.org,
public-html@w3.org
The CSS3 Image Values spec defines an element() function
<http://dev.w3.org/csswg/css3-images/#element-reference> which allows an author
use an element as an image. This was inspired by Mozilla's proprietary
-moz-element() experiment. <https://developer.mozilla.org/en/CSS/-moz-element>
One interesting feature of -moz-element() is the ability to use <img>, <video>,
and <canvas> in it without inserting them into the document; you instead use
mozSetImageElement(<name>, <element>) to give it an additional "pseudo-id"
which will then match the id selector used in -moz-element().
When I put this feature into the specification, I wanted a similar feature, but
didn't like the design. Discussion with Hixie led to the creation of the
CSSElementMap
<http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#dom-document-csselementmap>,
which is simply a map from strings to elements, and otherwise works the same
way. This didn't make it into the W3C's version of HTML5 because it happened
to be in a feature-freeze at the time, and got missed when we unfroze.
I would like the W3C HTML5 to define CSSElementMap as well, matching the WHATWG
HTML5 definition. There are some caveats, however.
If this feature is purely for CSS, it is more appropriately placed in the
CSSOM. However, this is potentially useful for similar purposes in other DOM
operations. For example, querySelector() with an id selector could return
elements from the map, or even getElementByID() (in which case we should rename
it to ElementMap or something).
Do we think that this is better suited as a pure-CSS feature, or are we
interested in integrating it elsewhere in the DOM?
--
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
Received on Thursday, 1 March 2012 14:12:21 UTC