[Bug 27062] DOMException constructor should allow name to be supplied

https://www.w3.org/Bugs/Public/show_bug.cgi?id=27062

--- Comment #3 from Cameron McCormack <cam@mcc.id.au> ---
(In reply to Domenic Denicola from comment #0)
> I am trying to create e.g. an IndexedSizeError so as to better match the
> behavior of native elements, and cannot do so since the DOMException
> constructor only takes a message, and not a name.

I'm fine with this, but did you mean you can't do it all, or just not in a
single line?

  var e = new DOMException("...");
  e.name = "IndexSizeError";
  e.code = 1;

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Received on Friday, 14 November 2014 05:54:14 UTC