- From: Anne van Kesteren <annevk@opera.com>
- Date: Mon, 20 Aug 2007 17:16:49 +0200
- To: "Alexey Proskuryakov" <ap-carbon@rambler.ru>, "Dan Connolly" <connolly@w3.org>, public-webapi@w3.org
On Wed, 15 Aug 2007 10:01:12 +0200, Alexey Proskuryakov
<ap-carbon@rambler.ru> wrote:
>> I'd like an example of how to catch this exception.
>
> FWIW, WebKit trunk doesn't raise this exception yet, opting for a
> temporary XMLHttpRequestException code. My feeling is that
> interoperability in this area will take a while to achieve.
I think there's general agreement that it should take ExceptionCode 18 on
DOMException. You should be able to catch it as follows, fwiw:
try {
...
} catch(e) {
switch(e.code) {
case e.SECURITY_ERR:
...
}
}
if I haven't mixed up the syntax of the switch case construct in some way.
--
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>
Received on Monday, 20 August 2007 15:17:09 UTC