W3C home > Mailing lists > Public > public-html-bugzilla@w3.org > May 2011

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

From: <bugzilla@jessica.w3.org>
Date: Fri, 06 May 2011 01:35:42 +0000
To: public-html-bugzilla@w3.org
Message-Id: <E1QI9xG-00072u-00@jessica.w3.org>
http://www.w3.org/Bugs/Public/show_bug.cgi?id=11857

Hallvord R. M. Steen <hallvord@opera.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|NEEDSINFO                   |

--- Comment #6 from Hallvord R. M. Steen <hallvord@opera.com> 2011-05-06 01:35:41 UTC ---
Makes sense to me not to throw by default - it's not like JS is consistent
anyway..

Unless WebIDL defines an extended attribute
[ThrowsIfNumberOfArgumentsIsUnexpected] or something like that, individual
specs should say in the prose what happens. (Then again, it would be nice to
have a way to indicate this in the IDL without repeating such things in prose
all over the place.. 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..) 

I think that means it's over to you again, Ian ;) I propose adding a sentence
more or less like 

"If getData() is called with less than or more than one single argument, the
implementation must throw a SyntaxError exception."

(Opera's old WRONG_ARGUMENTS_ERROR would have been nice but I think we never
got that into a spec? Haven't looked it up, so I may be plain wrong.. In any
case better to just follow WebKit on this.)

-- 
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 Friday, 6 May 2011 01:35:43 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 6 May 2011 01:37:35 GMT