1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
5 * You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_dom_TestReflectedHTMLAttribute_h
8 #define mozilla_dom_TestReflectedHTMLAttribute_h
10 #include "mozilla/dom/BindingDeclarations.h"
11 #include "mozilla/dom/Element.h"
12 #include "mozilla/dom/Nullable.h"
13 #include "nsWrapperCache.h"
15 namespace mozilla::dom
{
17 class TestReflectedHTMLAttribute final
: public nsWrapperCache
{
19 NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(TestReflectedHTMLAttribute
)
20 NS_DECL_CYCLE_COLLECTION_NATIVE_WRAPPERCACHE_CLASS(TestReflectedHTMLAttribute
)
22 static already_AddRefed
<TestReflectedHTMLAttribute
> Constructor(
23 GlobalObject
& aGlobal
);
25 void GetReflectedHTMLAttribute(bool* aUseCachedValue
,
26 Nullable
<nsTArray
<RefPtr
<Element
>>>& aResult
);
27 void SetReflectedHTMLAttribute(
28 const Nullable
<Sequence
<OwningNonNull
<Element
>>>& aValue
);
29 void SetReflectedHTMLAttributeValue(
30 const Sequence
<OwningNonNull
<Element
>>& aElements
);
32 nsISupports
* GetParentObject() const { return nullptr; }
33 JSObject
* WrapObject(JSContext
* aCx
,
34 JS::Handle
<JSObject
*> aGivenProto
) override
;
37 ~TestReflectedHTMLAttribute() = default;
39 Nullable
<nsTArray
<RefPtr
<Element
>>> mCachedElements
;
40 Nullable
<nsTArray
<RefPtr
<Element
>>> mNewElements
;
43 } // namespace mozilla::dom
45 #endif // mozilla_dom_TestReflectedHTMLAttribute_h