W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2013

Re: [whatwg] Proposal: Adding methods like getElementById and getElementsByTagName to DocumentFragments

From: Domenic Denicola <domenic@domenicdenicola.com>
Date: Thu, 10 Oct 2013 00:50:05 +0000
To: Glenn Maynard <glenn@zewt.org>, Boris Zbarsky <bzbarsky@mit.edu>
Message-ID: <B4AE8F4E86E26C47AC407D49872F6F9F9B27166C@BY2PRD0510MB354.namprd05.prod.outlook.com>
Cc: whatwg <whatwg@lists.whatwg.org>
Eventually ES6 template strings [1] will make this awesome, as you'll do

querySelector(css`\n`)

or

querySelector(css`[data-some-id=${myId}]`)

or even

qs`[data-some-id=${myId}]`

But someone has to write these functions (css and/or qs) and there's no point in creating standard versions until template strings are actually in browsers. (Well, modulo transpilers.) In the meantime a CSS escaper function would be great and could be used to much more easily prolyfill such template string functions, or be useful independently. So, uh, +1 to that idea.

[1]: http://www.slideshare.net/domenicdenicola/es6-the-awesome-parts/23

Received on Thursday, 10 October 2013 00:50:33 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:11 UTC