- From: <bugzilla@jessica.w3.org>
- Date: Tue, 08 Mar 2011 04:10:16 +0000
- To: public-script-coord@w3.org
http://www.w3.org/Bugs/Public/show_bug.cgi?id=12248
--- Comment #21 from Brendan Eich <brendan@mozilla.org> 2011-03-08 04:10:16 UTC ---
(In reply to comment #18)
> Well, not the *method* getting it, but the binding glue when marshalling
> arguments from JS to the DOM implementation.
[snip...]
> The generalized version of ToPropertyDescriptor that would be used here would
> serialize the whole object graph starting from its argument. (At least, that's
> how I imagined the serialization to work.) That could well result in getting a
> property "whose value it [the method] does not use".
How can you write a generalized serializer when only certain keyword parameters
specific to the method being specified, are wanted?
You can abstract a helper that looks for a list of keys, and returns a list of
values, say. But the processing for a given method-being-spec'ed will not first
blindly clone (by serialization) the object passed as keyword-parameter set.
> ToPropertyDescriptor itself doesn't look at properties other than "enumerable",
> "configurable", etc. My (A) would look at every property on the object (and
> its objects (and its objects...)).
Why? Can you show any DOM or WebAPI/Apps methods being proposed or already
spec'ed that use such a "deep" keyword-parameter-set object?
What problem is being solved here? I thought the issue was how to spec a method
M called like so (say on a DOM node N):
N.M(arg1, arg2, {key1:val1, ... keyN:valN});
where M interprets the final positional parameter by looking for a fixed set of
keyword parameter property names.
/be
--
Configure bugmail: http://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 Tuesday, 8 March 2011 04:10:18 UTC