Tab Atkins Jr. wrote:
let o = { items: function() {} };
would pass that test.
I'm not sure how else you're supposed to detect iterables.
It's not 'items', btw. The iterator-getter/maker is named 'iterator' in
SpiderMonkey currently, and last I heard would be @iterator (well-known
public
On Nov 20, 2012, at 8:08 PM, Tab Atkins Jr. jackalm...@gmail.com wrote:
On Tue, Nov 20, 2012 at 3:28 AM, Alex Russell a...@dojotoolkit.org wrote:
Actually, looking at this IDL more closely, I see unneeded invariants
causing most of the problem. If URLQuery subclasses Map (assuming we make
On Nov 19, 2012, at 11:16 PM, Tab Atkins Jr. jackalm...@gmail.com wrote:
For several things in the DOM and related APIs, we want objects that
are more-or-less the same as some basic ES stuff, like Arrays or Maps,
and which are appropriate to treat as those objects in a generic
manner.
For
Actually, looking at this IDL more closely, I see unneeded invariants
causing most of the problem. If URLQuery subclasses Map (assuming we make
this possible, which we should), it only needs to promise to hand back
strings, not take them. The behavior can simply be defined as
toString()-ing the
For URLQuery in particular, since it's a String-String map, why not just use a
plain-old-JavaScript-object with appropriate interceptions via a proxy? This
provides a much more idiomatic API:
new URLQuery(object) stays the same
urlQuery.get(name) - urlQuery[name][0]
urlQuery.getAll(name) -
I think the basic issue here is that DOM is over-specifying the constraints
(I assume because WebIDL makes that most natural?), not the available JS
hacks to implement their weirdo type constraints. Lets not feed the
misdesign trolls = )
On Tue, Nov 20, 2012 at 2:25 PM, Domenic Denicola
On Tue, Nov 20, 2012 at 9:25 AM, Domenic Denicola
dome...@domenicdenicola.com wrote:
For URLQuery in particular, since it's a String-String map, why not just
use a plain-old-JavaScript-object with appropriate interceptions via a
proxy? This provides a much more idiomatic API:
new
On Mon, Nov 19, 2012 at 9:46 PM, Brendan Eich bren...@mozilla.com wrote:
Tab Atkins Jr. wrote:
If we did this, the only reason to continue subclassing Map is to get
instanceof checks to work. Is this acceptable?
I think it's either irrelevant (no one tests 'aUrlQuery instanceof Map') or
On Tue, Nov 20, 2012 at 3:28 AM, Alex Russell a...@dojotoolkit.org wrote:
Actually, looking at this IDL more closely, I see unneeded invariants
causing most of the problem. If URLQuery subclasses Map (assuming we make
this possible, which we should),
Already possible. AWB posted code to
On Tue, Nov 20, 2012 at 9:38 AM, Erik Arvidsson
erik.arvids...@gmail.com wrote:
On Tue, Nov 20, 2012 at 9:25 AM, Domenic Denicola
dome...@domenicdenicola.com wrote:
For URLQuery in particular, since it's a String-String map, why not just
use a plain-old-JavaScript-object with appropriate
On Tue, Nov 20, 2012 at 2:45 PM, Tab Atkins Jr. jackalm...@gmail.comwrote:
On Mon, Nov 19, 2012 at 9:46 PM, Brendan Eich bren...@mozilla.com wrote:
Tab Atkins Jr. wrote:
If we did this, the only reason to continue subclassing Map is to get
instanceof checks to work. Is this acceptable?
On Tue, Nov 20, 2012 at 1:31 PM, Rick Waldron waldron.r...@gmail.com wrote:
On Tue, Nov 20, 2012 at 2:45 PM, Tab Atkins Jr. jackalm...@gmail.com
wrote:
On Mon, Nov 19, 2012 at 9:46 PM, Brendan Eich bren...@mozilla.com wrote:
Tab Atkins Jr. wrote:
If we did this, the only reason to continue
On Tue, Nov 20, 2012 at 10:31 PM, Rick Waldron waldron.r...@gmail.com wrote:
On Tue, Nov 20, 2012 at 2:45 PM, Tab Atkins Jr. jackalm...@gmail.com
wrote:
On Mon, Nov 19, 2012 at 9:46 PM, Brendan Eich bren...@mozilla.com wrote:
Tab Atkins Jr. wrote:
If we did this, the only reason to
On Tue, Nov 20, 2012 at 4:54 PM, Peter van der Zee e...@qfox.nl wrote:
On Tue, Nov 20, 2012 at 10:31 PM, Rick Waldron waldron.r...@gmail.com
wrote:
On Tue, Nov 20, 2012 at 2:45 PM, Tab Atkins Jr. jackalm...@gmail.com
wrote:
On Mon, Nov 19, 2012 at 9:46 PM, Brendan Eich
On Tue, Nov 20, 2012 at 4:52 PM, Tab Atkins Jr. jackalm...@gmail.comwrote:
On Tue, Nov 20, 2012 at 1:31 PM, Rick Waldron waldron.r...@gmail.com
wrote:
On Tue, Nov 20, 2012 at 2:45 PM, Tab Atkins Jr. jackalm...@gmail.com
wrote:
On Mon, Nov 19, 2012 at 9:46 PM, Brendan Eich
On Tue, Nov 20, 2012 at 3:08 PM, Tab Atkins Jr. jackalm...@gmail.comwrote:
On Tue, Nov 20, 2012 at 3:28 AM, Alex Russell a...@dojotoolkit.org
wrote:
Actually, looking at this IDL more closely, I see unneeded invariants
causing most of the problem. If URLQuery subclasses Map (assuming we
On Tue, Nov 20, 2012 at 2:02 PM, Rick Waldron waldron.r...@gmail.com wrote:
On Tue, Nov 20, 2012 at 4:52 PM, Tab Atkins Jr. jackalm...@gmail.com
wrote:
Of course, that pattern is broken too - it lets you detect actual
Arrays, but not things that subclass Array.
That's not possible in
On Tue, Nov 20, 2012 at 2:06 PM, Rick Waldron waldron.r...@gmail.com wrote:
On Tue, Nov 20, 2012 at 3:08 PM, Tab Atkins Jr. jackalm...@gmail.com
wrote:
Nope, that's not good enough. For example, you have to do input
cleanup (replacing lone surrogates with U+FFFD, escaping , etc.)
which
On Tuesday, November 20, 2012 at 5:23 PM, Tab Atkins Jr. wrote:
On Tue, Nov 20, 2012 at 2:02 PM, Rick Waldron waldron.r...@gmail.com wrote:
On Tue, Nov 20, 2012 at 4:52 PM, Tab Atkins Jr. jackalm...@gmail.com
wrote:
Of course, that pattern is broken too - it lets you detect actual
On Tuesday, November 20, 2012 at 5:25 PM, Tab Atkins Jr. wrote:
On Tue, Nov 20, 2012 at 2:06 PM, Rick Waldron waldron.r...@gmail.com wrote:
On Tue, Nov 20, 2012 at 3:08 PM, Tab Atkins Jr. jackalm...@gmail.com
wrote:
Nope, that's not good enough. For example, you have to do input
On Tue, Nov 20, 2012 at 2:52 PM, Rick Waldron waldron.r...@gmail.com wrote:
On Tuesday, November 20, 2012 at 5:23 PM, Tab Atkins Jr. wrote:
function foo() {...}
foo.prototype = [];
var a = new foo();
a.push(1);
a.length; // 1
a.length = 0;
console.log(a);
{0:1,length:0}
Again, it's
Could you use a client that quotes properly? Your responses keep
flattening the quotes to a single level, making it impossible to tell
where each ends.
On Tue, Nov 20, 2012 at 2:56 PM, Rick Waldron waldron.r...@gmail.com wrote:
On Tuesday, November 20, 2012 at 5:25 PM, Tab Atkins Jr. wrote:
22 matches
Mail list logo