Line data Source code
1 : /* THIS FILE IS AUTOGENERATED FROM HTMLDocument.webidl BY Codegen.py - DO NOT EDIT */
2 :
3 : #ifndef mozilla_dom_HTMLDocumentBinding_h
4 : #define mozilla_dom_HTMLDocumentBinding_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 : class nsHTMLDocument;
13 : struct nsHTMLDocumentAtoms;
14 :
15 : namespace mozilla {
16 : namespace dom {
17 :
18 : struct NativePropertyHooks;
19 : class ProtoAndIfaceCache;
20 :
21 : } // namespace dom
22 : } // namespace mozilla
23 :
24 : namespace mozilla {
25 : namespace dom {
26 :
27 : namespace HTMLDocumentBinding {
28 :
29 : typedef nsHTMLDocument NativeType;
30 :
31 : JSObject*
32 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
33 :
34 : bool
35 : Wrap(JSContext* aCx, nsHTMLDocument* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
36 :
37 : template <class T>
38 7 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
39 : {
40 14 : JS::Rooted<JSObject*> reflector(aCx);
41 14 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
42 : }
43 :
44 : // We declare this as an array so that retrieving a pointer to this
45 : // binding's property hooks only requires compile/link-time resolvable
46 : // address arithmetic. Declaring it as a pointer instead would require
47 : // doing a run-time load to fetch a pointer to this binding's property
48 : // hooks. And then structures which embedded a pointer to this structure
49 : // would require a run-time load for proper initialization, which would
50 : // then induce static constructors. Lots of static constructors.
51 : extern const NativePropertyHooks sNativePropertyHooks[];
52 :
53 : void
54 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
55 :
56 : JS::Handle<JSObject*>
57 : GetProtoObjectHandle(JSContext* aCx);
58 :
59 : JSObject*
60 : GetProtoObject(JSContext* aCx);
61 :
62 : JS::Handle<JSObject*>
63 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
64 :
65 : JSObject*
66 : GetConstructorObject(JSContext* aCx);
67 :
68 : } // namespace HTMLDocumentBinding
69 :
70 :
71 :
72 : } // namespace dom
73 : } // namespace mozilla
74 :
75 : #endif // mozilla_dom_HTMLDocumentBinding_h
|