[Bug 11857] getData() with no or too many arguments should throw

http://www.w3.org/Bugs/Public/show_bug.cgi?id=11857

--- Comment #7 from Cameron McCormack <cam@mcc.id.au> 2011-05-08 23:56:40 UTC ---
(In reply to comment #6)
> A related question - JS only - is how methods behave if
> they are called with an unexpected this object. There is no IDL attribute to
> indicate whether i.e. "window.alert.call(document, 'Do you see this alert?')"
> should throw? But now I'm off-topic..

You're right, Web IDL doesn't make this throw.  I thought I had wording in
there to make it throw, but I can't see any.  I think there should be a step in
http://dev.w3.org/2006/webapi/WebIDL/#es-operations that checks that the this
object is of the right type and throws a TypeError if it is not.  Filed bug
12635 for that.

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Sunday, 8 May 2011 23:56:42 UTC