W3C home > Mailing lists > Public > public-script-coord@w3.org > October to December 2014

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

From: <bugzilla@jessica.w3.org>
Date: Fri, 14 Nov 2014 05:54:12 +0000
To: public-script-coord@w3.org
Message-ID: <bug-27062-3890-N4uaOYbeBK@http.www.w3.org/Bugs/Public/>

--- 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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:23 UTC