Copy as Markdown

Other Tools

/* THIS FILE IS AUTOGENERATED FROM Node.webidl BY Codegen.py - DO NOT EDIT */
#ifndef DOM_NODEBINDING_H_
#define DOM_NODEBINDING_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 nsINode;
namespace mozilla {
namespace dom {
struct GetRootNodeOptionsAtoms;
struct NativePropertyHooks;
class ProtoAndIfaceCache;
} // namespace dom
} // namespace mozilla
namespace mozilla::dom {
struct GetRootNodeOptions : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR bool mComposed;
GetRootNodeOptions();
explicit inline GetRootNodeOptions(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
GetRootNodeOptions(GetRootNodeOptions&& aOther) = default;
explicit inline GetRootNodeOptions(const GetRootNodeOptions& aOther)
{
*this = aOther;
}
bool
Init(BindingCallContext& cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
Init(JSContext* cx_, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
void
TraceDictionary(JSTracer* trc);
GetRootNodeOptions&
operator=(const GetRootNodeOptions& aOther);
bool
operator==(const GetRootNodeOptions& aOther) const;
private:
static bool
InitIds(JSContext* cx, GetRootNodeOptionsAtoms* atomsCache);
};
namespace binding_detail {
struct FastGetRootNodeOptions : public GetRootNodeOptions
{
inline FastGetRootNodeOptions()
: GetRootNodeOptions(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
namespace Node_Binding {
typedef nsINode NativeType;
static const uint16_t ELEMENT_NODE = 1;
static const uint16_t ATTRIBUTE_NODE = 2;
static const uint16_t TEXT_NODE = 3;
static const uint16_t CDATA_SECTION_NODE = 4;
static const uint16_t ENTITY_REFERENCE_NODE = 5;
static const uint16_t ENTITY_NODE = 6;
static const uint16_t PROCESSING_INSTRUCTION_NODE = 7;
static const uint16_t COMMENT_NODE = 8;
static const uint16_t DOCUMENT_NODE = 9;
static const uint16_t DOCUMENT_TYPE_NODE = 10;
static const uint16_t DOCUMENT_FRAGMENT_NODE = 11;
static const uint16_t NOTATION_NODE = 12;
static const uint16_t DOCUMENT_POSITION_DISCONNECTED = 1;
static const uint16_t DOCUMENT_POSITION_PRECEDING = 2;
static const uint16_t DOCUMENT_POSITION_FOLLOWING = 4;
static const uint16_t DOCUMENT_POSITION_CONTAINS = 8;
static const uint16_t DOCUMENT_POSITION_CONTAINED_BY = 16;
static const uint16_t DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 32;
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::Node,
&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::Node,
&CreateInterfaceObjects,
aDefineOnGlobal);
}
JSObject*
GetConstructorObject(JSContext* aCx);
} // namespace Node_Binding
} // namespace mozilla::dom
#endif // DOM_NODEBINDING_H_