[WebIDL] interface objects with [Constructor] and [[Call]]

Hi,

Should interface objects with the [Constructor] extended attribute  
implement [[Call]] in ECMAScript? What should happen when it's invoked? It  
doesn't seem to be defined in WebIDL.

For builtins in ECMAScript the behavior varies. ES follows [[Call]] ===  
[[Construct]] except for String, Number, Boolean, Date and RegExp.  
Although [[Call]] on those don't throw, just do something different  
compared to [[Construct]].

For XMLHttpRequest, Opera and Firefox act as if [[Construct]] was invoked  
for [[Call]], while Safari and Chrome throw a TypeError exception. Please  
define which is correct.

Cheers,
-- 
Simon Pieters
Opera Software

Received on Thursday, 27 May 2010 10:56:38 UTC