gecko/dom/webidl/XMLHttpRequestEventTarget.webidl
Boris Zbarsky 3e8ac4b134 Bug 757164. Move infallibility annotations into webidl. r=peterv
In this new setup, there are three new extended attributes: Infallible,
GetterInfallible, SetterInfallible.  The first one applies to both methods and
attributes, while the last two apply only to attributes.  Each one can be
either set with no value specified (in which case it applies both on main
thread and in workers) or can be set to MainThread or Workers to limit where it
applies.

If Infallible is set on an attribute, then GetterInfallible and
SetterInfallible will be ignored.  So if you want to specify, for example, an
attribute that's infallible on the main thread and has an infallible getter in
workers, the right way to do that is [GetterInfallible,
SetterInfallible=MainThread].
2012-07-13 19:29:14 -04:00

37 lines
1.2 KiB
Plaintext

/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*
* The origin of this IDL file is
* www.w3.org/TR/2012/WD-XMLHttpRequest-20120117/
*
* Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
* liability, trademark and document use rules apply.
*/
[NoInterfaceObject]
interface XMLHttpRequestEventTarget : EventTarget {
// event handlers
[TreatNonCallableAsNull, GetterInfallible=MainThread]
attribute Function? onloadstart;
[TreatNonCallableAsNull, GetterInfallible=MainThread]
attribute Function? onprogress;
[TreatNonCallableAsNull, GetterInfallible=MainThread]
attribute Function? onabort;
[TreatNonCallableAsNull, GetterInfallible=MainThread]
attribute Function? onerror;
[TreatNonCallableAsNull, GetterInfallible=MainThread]
attribute Function? onload;
[TreatNonCallableAsNull, GetterInfallible=MainThread]
attribute Function? ontimeout;
[TreatNonCallableAsNull, GetterInfallible=MainThread]
attribute Function? onloadend;
};