Copy as Markdown

Other Tools

/* THIS FILE IS AUTOGENERATED FROM DOMException.webidl BY Codegen.py - DO NOT EDIT */
#ifndef DOM_DOMEXCEPTIONBINDING_H_
#define DOM_DOMEXCEPTIONBINDING_H_
#include "js/CallAndConstruct.h"
#include "js/RootingAPI.h"
#include "js/TypeDecls.h"
#include "mozilla/dom/BindingDeclarations.h"
#include "mozilla/dom/Nullable.h"
#include "mozilla/dom/PrototypeList.h"
class nsIGlobalObject;
namespace mozilla {
namespace dom {
class DOMException;
class Exception;
struct NativePropertyHooks;
class ProtoAndIfaceCache;
} // namespace dom
} // namespace mozilla
namespace mozilla::dom {
namespace DOMException_Binding {
typedef mozilla::dom::DOMException NativeType;
static const uint16_t INDEX_SIZE_ERR = 1;
static const uint16_t DOMSTRING_SIZE_ERR = 2;
static const uint16_t HIERARCHY_REQUEST_ERR = 3;
static const uint16_t WRONG_DOCUMENT_ERR = 4;
static const uint16_t INVALID_CHARACTER_ERR = 5;
static const uint16_t NO_DATA_ALLOWED_ERR = 6;
static const uint16_t NO_MODIFICATION_ALLOWED_ERR = 7;
static const uint16_t NOT_FOUND_ERR = 8;
static const uint16_t NOT_SUPPORTED_ERR = 9;
static const uint16_t INUSE_ATTRIBUTE_ERR = 10;
static const uint16_t INVALID_STATE_ERR = 11;
static const uint16_t SYNTAX_ERR = 12;
static const uint16_t INVALID_MODIFICATION_ERR = 13;
static const uint16_t NAMESPACE_ERR = 14;
static const uint16_t INVALID_ACCESS_ERR = 15;
static const uint16_t VALIDATION_ERR = 16;
static const uint16_t TYPE_MISMATCH_ERR = 17;
static const uint16_t SECURITY_ERR = 18;
static const uint16_t NETWORK_ERR = 19;
static const uint16_t ABORT_ERR = 20;
static const uint16_t URL_MISMATCH_ERR = 21;
static const uint16_t QUOTA_EXCEEDED_ERR = 22;
static const uint16_t TIMEOUT_ERR = 23;
static const uint16_t INVALID_NODE_TYPE_ERR = 24;
static const uint16_t DATA_CLONE_ERR = 25;
JSObject*
Deserialize(JSContext* aCx, nsIGlobalObject* aGlobal, JSStructuredCloneReader* aReader);
bool
Wrap(JSContext* aCx, mozilla::dom::DOMException* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
template <class T>
inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
{
JS::Rooted<JSObject*> reflector(aCx);
return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
}
void
CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
inline JS::Handle<JSObject*> GetProtoObjectHandle(JSContext* aCx)
{
/* Get the interface prototype object for this class. This will create the
object as needed. */
return GetPerInterfaceObjectHandle(aCx, prototypes::id::DOMException,
&CreateInterfaceObjects,
/* aDefineOnGlobal = */ true);
}
JSObject*
GetProtoObject(JSContext* aCx);
inline JS::Handle<JSObject*> GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true)
{
/* Get the interface object for this class. This will create the object as
needed. */
return GetPerInterfaceObjectHandle(aCx, constructors::id::DOMException,
&CreateInterfaceObjects,
aDefineOnGlobal);
}
JSObject*
GetConstructorObject(JSContext* aCx);
} // namespace DOMException_Binding
namespace Exception_Binding {
typedef mozilla::dom::Exception NativeType;
bool
Wrap(JSContext* aCx, mozilla::dom::Exception* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
template <class T>
inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
{
JS::Rooted<JSObject*> reflector(aCx);
return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
}
void
CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
inline JS::Handle<JSObject*> GetProtoObjectHandle(JSContext* aCx)
{
/* Get the interface prototype object for this class. This will create the
object as needed. */
return GetPerInterfaceObjectHandle(aCx, prototypes::id::Exception,
&CreateInterfaceObjects,
/* aDefineOnGlobal = */ true);
}
} // namespace Exception_Binding
} // namespace mozilla::dom
#endif // DOM_DOMEXCEPTIONBINDING_H_