Copy as Markdown

Other Tools

/* THIS FILE IS AUTOGENERATED FROM XPathResult.webidl BY Codegen.py - DO NOT EDIT */
#ifndef DOM_XPATHRESULTBINDING_H_
#define DOM_XPATHRESULTBINDING_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"
namespace mozilla {
namespace dom {
struct NativePropertyHooks;
class ProtoAndIfaceCache;
class XPathResult;
} // namespace dom
} // namespace mozilla
namespace mozilla::dom {
namespace XPathResult_Binding {
typedef mozilla::dom::XPathResult NativeType;
static const uint16_t ANY_TYPE = 0;
static const uint16_t NUMBER_TYPE = 1;
static const uint16_t STRING_TYPE = 2;
static const uint16_t BOOLEAN_TYPE = 3;
static const uint16_t UNORDERED_NODE_ITERATOR_TYPE = 4;
static const uint16_t ORDERED_NODE_ITERATOR_TYPE = 5;
static const uint16_t UNORDERED_NODE_SNAPSHOT_TYPE = 6;
static const uint16_t ORDERED_NODE_SNAPSHOT_TYPE = 7;
static const uint16_t ANY_UNORDERED_NODE_TYPE = 8;
static const uint16_t FIRST_ORDERED_NODE_TYPE = 9;
bool
Wrap(JSContext* aCx, mozilla::dom::XPathResult* 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::XPathResult,
&CreateInterfaceObjects,
/* aDefineOnGlobal = */ true);
}
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::XPathResult,
&CreateInterfaceObjects,
aDefineOnGlobal);
}
JSObject*
GetConstructorObject(JSContext* aCx);
} // namespace XPathResult_Binding
} // namespace mozilla::dom
#endif // DOM_XPATHRESULTBINDING_H_