Line data Source code
1 : /* THIS FILE IS AUTOGENERATED FROM DOMParser.webidl BY Codegen.py - DO NOT EDIT */
2 :
3 : #ifndef mozilla_dom_DOMParserBinding_h
4 : #define mozilla_dom_DOMParserBinding_h
5 :
6 : #include "js/RootingAPI.h"
7 : #include "jspubtd.h"
8 : #include "mozilla/ErrorResult.h"
9 : #include "mozilla/dom/BindingDeclarations.h"
10 : #include "mozilla/dom/Nullable.h"
11 :
12 : namespace mozilla {
13 : namespace dom {
14 :
15 : class DOMParser;
16 : struct DOMParserAtoms;
17 : struct NativePropertyHooks;
18 : class ProtoAndIfaceCache;
19 :
20 : } // namespace dom
21 : } // namespace mozilla
22 :
23 : namespace mozilla {
24 : namespace dom {
25 :
26 : enum class SupportedType : uint8_t {
27 : Text_html,
28 : Text_xml,
29 : Application_xml,
30 : Application_xhtml_xml,
31 : Image_svg_xml,
32 : EndGuard_
33 : };
34 :
35 : namespace SupportedTypeValues {
36 : extern const EnumEntry strings[6];
37 : } // namespace SupportedTypeValues
38 :
39 : bool
40 : ToJSValue(JSContext* aCx, SupportedType aArgument, JS::MutableHandle<JS::Value> aValue);
41 :
42 :
43 : namespace DOMParserBinding {
44 :
45 : typedef mozilla::dom::DOMParser NativeType;
46 :
47 : JSObject*
48 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
49 :
50 : const JSClass*
51 : GetJSClass();
52 :
53 : bool
54 : Wrap(JSContext* aCx, mozilla::dom::DOMParser* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
55 :
56 : template <class T>
57 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
58 : {
59 0 : JS::Rooted<JSObject*> reflector(aCx);
60 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
61 : }
62 :
63 : // We declare this as an array so that retrieving a pointer to this
64 : // binding's property hooks only requires compile/link-time resolvable
65 : // address arithmetic. Declaring it as a pointer instead would require
66 : // doing a run-time load to fetch a pointer to this binding's property
67 : // hooks. And then structures which embedded a pointer to this structure
68 : // would require a run-time load for proper initialization, which would
69 : // then induce static constructors. Lots of static constructors.
70 : extern const NativePropertyHooks sNativePropertyHooks[];
71 :
72 : void
73 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
74 :
75 : JS::Handle<JSObject*>
76 : GetProtoObjectHandle(JSContext* aCx);
77 :
78 : JS::Handle<JSObject*>
79 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
80 :
81 : JSObject*
82 : GetConstructorObject(JSContext* aCx);
83 :
84 : } // namespace DOMParserBinding
85 :
86 :
87 :
88 : } // namespace dom
89 : } // namespace mozilla
90 :
91 : #endif // mozilla_dom_DOMParserBinding_h
|