1 | /* |
2 | This file is part of the WebKit open source project. |
3 | This file has been generated by generate-bindings.pl. DO NOT MODIFY! |
4 | |
5 | This library is free software; you can redistribute it and/or |
6 | modify it under the terms of the GNU Library General Public |
7 | License as published by the Free Software Foundation; either |
8 | version 2 of the License, or (at your option) any later version. |
9 | |
10 | This library is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Library General Public License for more details. |
14 | |
15 | You should have received a copy of the GNU Library General Public License |
16 | along with this library; see the file COPYING.LIB. If not, write to |
17 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
18 | Boston, MA 02110-1301, USA. |
19 | */ |
20 | |
21 | #include "config.h" |
22 | #include "JSHTMLAnchorElement.h" |
23 | |
24 | #include "CustomElementReactionQueue.h" |
25 | #include "HTMLNames.h" |
26 | #include "JSDOMAttribute.h" |
27 | #include "JSDOMBinding.h" |
28 | #include "JSDOMConstructorNotConstructable.h" |
29 | #include "JSDOMConvertInterface.h" |
30 | #include "JSDOMConvertStrings.h" |
31 | #include "JSDOMExceptionHandling.h" |
32 | #include "JSDOMGlobalObject.h" |
33 | #include "JSDOMOperation.h" |
34 | #include "JSDOMTokenList.h" |
35 | #include "JSDOMWrapperCache.h" |
36 | #include "RuntimeEnabledFeatures.h" |
37 | #include "ScriptExecutionContext.h" |
38 | #include <JavaScriptCore/HeapSnapshotBuilder.h> |
39 | #include <JavaScriptCore/JSCInlines.h> |
40 | #include <wtf/GetPtr.h> |
41 | #include <wtf/PointerPreparations.h> |
42 | #include <wtf/URL.h> |
43 | |
44 | |
45 | namespace WebCore { |
46 | using namespace JSC; |
47 | |
48 | // Functions |
49 | |
50 | JSC::EncodedJSValue JSC_HOST_CALL jsHTMLAnchorElementPrototypeFunctionToString(JSC::ExecState*); |
51 | |
52 | // Attributes |
53 | |
54 | JSC::EncodedJSValue jsHTMLAnchorElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
55 | bool setJSHTMLAnchorElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
56 | JSC::EncodedJSValue jsHTMLAnchorElementAdcampaignid(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
57 | bool setJSHTMLAnchorElementAdcampaignid(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
58 | JSC::EncodedJSValue jsHTMLAnchorElementAddestination(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
59 | bool setJSHTMLAnchorElementAddestination(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
60 | JSC::EncodedJSValue jsHTMLAnchorElementCharset(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
61 | bool setJSHTMLAnchorElementCharset(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
62 | JSC::EncodedJSValue jsHTMLAnchorElementCoords(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
63 | bool setJSHTMLAnchorElementCoords(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
64 | #if ENABLE(DOWNLOAD_ATTRIBUTE) |
65 | JSC::EncodedJSValue jsHTMLAnchorElementDownload(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
66 | bool setJSHTMLAnchorElementDownload(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
67 | #endif |
68 | JSC::EncodedJSValue jsHTMLAnchorElementHreflang(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
69 | bool setJSHTMLAnchorElementHreflang(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
70 | JSC::EncodedJSValue jsHTMLAnchorElementName(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
71 | bool setJSHTMLAnchorElementName(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
72 | JSC::EncodedJSValue jsHTMLAnchorElementPing(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
73 | bool setJSHTMLAnchorElementPing(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
74 | JSC::EncodedJSValue jsHTMLAnchorElementRel(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
75 | bool setJSHTMLAnchorElementRel(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
76 | JSC::EncodedJSValue jsHTMLAnchorElementRev(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
77 | bool setJSHTMLAnchorElementRev(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
78 | JSC::EncodedJSValue jsHTMLAnchorElementShape(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
79 | bool setJSHTMLAnchorElementShape(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
80 | JSC::EncodedJSValue jsHTMLAnchorElementTarget(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
81 | bool setJSHTMLAnchorElementTarget(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
82 | JSC::EncodedJSValue jsHTMLAnchorElementType(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
83 | bool setJSHTMLAnchorElementType(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
84 | JSC::EncodedJSValue jsHTMLAnchorElementText(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
85 | bool setJSHTMLAnchorElementText(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
86 | JSC::EncodedJSValue jsHTMLAnchorElementRelList(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
87 | bool setJSHTMLAnchorElementRelList(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
88 | JSC::EncodedJSValue jsHTMLAnchorElementHref(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
89 | bool setJSHTMLAnchorElementHref(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
90 | JSC::EncodedJSValue jsHTMLAnchorElementOrigin(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
91 | JSC::EncodedJSValue jsHTMLAnchorElementProtocol(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
92 | bool setJSHTMLAnchorElementProtocol(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
93 | JSC::EncodedJSValue jsHTMLAnchorElementUsername(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
94 | bool setJSHTMLAnchorElementUsername(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
95 | JSC::EncodedJSValue jsHTMLAnchorElementPassword(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
96 | bool setJSHTMLAnchorElementPassword(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
97 | JSC::EncodedJSValue jsHTMLAnchorElementHost(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
98 | bool setJSHTMLAnchorElementHost(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
99 | JSC::EncodedJSValue jsHTMLAnchorElementHostname(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
100 | bool setJSHTMLAnchorElementHostname(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
101 | JSC::EncodedJSValue jsHTMLAnchorElementPort(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
102 | bool setJSHTMLAnchorElementPort(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
103 | JSC::EncodedJSValue jsHTMLAnchorElementPathname(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
104 | bool setJSHTMLAnchorElementPathname(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
105 | JSC::EncodedJSValue jsHTMLAnchorElementSearch(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
106 | bool setJSHTMLAnchorElementSearch(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
107 | JSC::EncodedJSValue jsHTMLAnchorElementHash(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
108 | bool setJSHTMLAnchorElementHash(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
109 | |
110 | class JSHTMLAnchorElementPrototype : public JSC::JSNonFinalObject { |
111 | public: |
112 | using Base = JSC::JSNonFinalObject; |
113 | static JSHTMLAnchorElementPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) |
114 | { |
115 | JSHTMLAnchorElementPrototype* ptr = new (NotNull, JSC::allocateCell<JSHTMLAnchorElementPrototype>(vm.heap)) JSHTMLAnchorElementPrototype(vm, globalObject, structure); |
116 | ptr->finishCreation(vm); |
117 | return ptr; |
118 | } |
119 | |
120 | DECLARE_INFO; |
121 | static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) |
122 | { |
123 | return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); |
124 | } |
125 | |
126 | private: |
127 | JSHTMLAnchorElementPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) |
128 | : JSC::JSNonFinalObject(vm, structure) |
129 | { |
130 | } |
131 | |
132 | void finishCreation(JSC::VM&); |
133 | }; |
134 | |
135 | using JSHTMLAnchorElementConstructor = JSDOMConstructorNotConstructable<JSHTMLAnchorElement>; |
136 | |
137 | template<> JSValue JSHTMLAnchorElementConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject) |
138 | { |
139 | return JSHTMLElement::getConstructor(vm, &globalObject); |
140 | } |
141 | |
142 | template<> void JSHTMLAnchorElementConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) |
143 | { |
144 | putDirect(vm, vm.propertyNames->prototype, JSHTMLAnchorElement::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
145 | putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("HTMLAnchorElement"_s )), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
146 | putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
147 | } |
148 | |
149 | template<> const ClassInfo JSHTMLAnchorElementConstructor::s_info = { "HTMLAnchorElement" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSHTMLAnchorElementConstructor) }; |
150 | |
151 | /* Hash table for prototype */ |
152 | |
153 | static const HashTableValue JSHTMLAnchorElementPrototypeTableValues[] = |
154 | { |
155 | { "constructor" , static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementConstructor) } }, |
156 | { "adcampaignid" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementAdcampaignid), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementAdcampaignid) } }, |
157 | { "addestination" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementAddestination), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementAddestination) } }, |
158 | { "charset" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementCharset), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementCharset) } }, |
159 | { "coords" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementCoords), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementCoords) } }, |
160 | #if ENABLE(DOWNLOAD_ATTRIBUTE) |
161 | { "download" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementDownload), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementDownload) } }, |
162 | #else |
163 | { 0, 0, NoIntrinsic, { 0, 0 } }, |
164 | #endif |
165 | { "hreflang" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementHreflang), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementHreflang) } }, |
166 | { "name" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementName), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementName) } }, |
167 | { "ping" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementPing), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementPing) } }, |
168 | { "rel" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementRel), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementRel) } }, |
169 | { "rev" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementRev), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementRev) } }, |
170 | { "shape" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementShape), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementShape) } }, |
171 | { "target" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementTarget), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementTarget) } }, |
172 | { "type" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementType), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementType) } }, |
173 | { "text" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementText), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementText) } }, |
174 | { "relList" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementRelList), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementRelList) } }, |
175 | { "href" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementHref), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementHref) } }, |
176 | { "origin" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementOrigin), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
177 | { "protocol" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementProtocol), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementProtocol) } }, |
178 | { "username" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementUsername), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementUsername) } }, |
179 | { "password" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementPassword), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementPassword) } }, |
180 | { "host" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementHost), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementHost) } }, |
181 | { "hostname" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementHostname), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementHostname) } }, |
182 | { "port" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementPort), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementPort) } }, |
183 | { "pathname" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementPathname), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementPathname) } }, |
184 | { "search" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementSearch), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementSearch) } }, |
185 | { "hash" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementHash), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementHash) } }, |
186 | { "toString" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsHTMLAnchorElementPrototypeFunctionToString), (intptr_t) (0) } }, |
187 | }; |
188 | |
189 | const ClassInfo JSHTMLAnchorElementPrototype::s_info = { "HTMLAnchorElementPrototype" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSHTMLAnchorElementPrototype) }; |
190 | |
191 | void JSHTMLAnchorElementPrototype::finishCreation(VM& vm) |
192 | { |
193 | Base::finishCreation(vm); |
194 | reifyStaticProperties(vm, JSHTMLAnchorElement::info(), JSHTMLAnchorElementPrototypeTableValues, *this); |
195 | bool hasDisabledRuntimeProperties = false; |
196 | if (!RuntimeEnabledFeatures::sharedFeatures().adClickAttributionEnabled()) { |
197 | hasDisabledRuntimeProperties = true; |
198 | auto propertyName = Identifier::fromString(&vm, reinterpret_cast<const LChar*>("adcampaignid" ), strlen("adcampaignid" )); |
199 | VM::DeletePropertyModeScope scope(vm, VM::DeletePropertyMode::IgnoreConfigurable); |
200 | JSObject::deleteProperty(this, globalObject()->globalExec(), propertyName); |
201 | } |
202 | if (!RuntimeEnabledFeatures::sharedFeatures().adClickAttributionEnabled()) { |
203 | hasDisabledRuntimeProperties = true; |
204 | auto propertyName = Identifier::fromString(&vm, reinterpret_cast<const LChar*>("addestination" ), strlen("addestination" )); |
205 | VM::DeletePropertyModeScope scope(vm, VM::DeletePropertyMode::IgnoreConfigurable); |
206 | JSObject::deleteProperty(this, globalObject()->globalExec(), propertyName); |
207 | } |
208 | #if ENABLE(DOWNLOAD_ATTRIBUTE) |
209 | if (!RuntimeEnabledFeatures::sharedFeatures().downloadAttributeEnabled()) { |
210 | hasDisabledRuntimeProperties = true; |
211 | auto propertyName = Identifier::fromString(&vm, reinterpret_cast<const LChar*>("download" ), strlen("download" )); |
212 | VM::DeletePropertyModeScope scope(vm, VM::DeletePropertyMode::IgnoreConfigurable); |
213 | JSObject::deleteProperty(this, globalObject()->globalExec(), propertyName); |
214 | } |
215 | #endif |
216 | if (hasDisabledRuntimeProperties && structure()->isDictionary()) |
217 | flattenDictionaryObject(vm); |
218 | } |
219 | |
220 | const ClassInfo JSHTMLAnchorElement::s_info = { "HTMLAnchorElement" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSHTMLAnchorElement) }; |
221 | |
222 | JSHTMLAnchorElement::JSHTMLAnchorElement(Structure* structure, JSDOMGlobalObject& globalObject, Ref<HTMLAnchorElement>&& impl) |
223 | : JSHTMLElement(structure, globalObject, WTFMove(impl)) |
224 | { |
225 | } |
226 | |
227 | void JSHTMLAnchorElement::finishCreation(VM& vm) |
228 | { |
229 | Base::finishCreation(vm); |
230 | ASSERT(inherits(vm, info())); |
231 | |
232 | } |
233 | |
234 | JSObject* JSHTMLAnchorElement::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) |
235 | { |
236 | return JSHTMLAnchorElementPrototype::create(vm, &globalObject, JSHTMLAnchorElementPrototype::createStructure(vm, &globalObject, JSHTMLElement::prototype(vm, globalObject))); |
237 | } |
238 | |
239 | JSObject* JSHTMLAnchorElement::prototype(VM& vm, JSDOMGlobalObject& globalObject) |
240 | { |
241 | return getDOMPrototype<JSHTMLAnchorElement>(vm, globalObject); |
242 | } |
243 | |
244 | JSValue JSHTMLAnchorElement::getConstructor(VM& vm, const JSGlobalObject* globalObject) |
245 | { |
246 | return getDOMConstructor<JSHTMLAnchorElementConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject)); |
247 | } |
248 | |
249 | template<> inline JSHTMLAnchorElement* IDLAttribute<JSHTMLAnchorElement>::cast(ExecState& state, EncodedJSValue thisValue) |
250 | { |
251 | return jsDynamicCast<JSHTMLAnchorElement*>(state.vm(), JSValue::decode(thisValue)); |
252 | } |
253 | |
254 | template<> inline JSHTMLAnchorElement* IDLOperation<JSHTMLAnchorElement>::cast(ExecState& state) |
255 | { |
256 | return jsDynamicCast<JSHTMLAnchorElement*>(state.vm(), state.thisValue()); |
257 | } |
258 | |
259 | EncodedJSValue jsHTMLAnchorElementConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName) |
260 | { |
261 | VM& vm = state->vm(); |
262 | auto throwScope = DECLARE_THROW_SCOPE(vm); |
263 | auto* prototype = jsDynamicCast<JSHTMLAnchorElementPrototype*>(vm, JSValue::decode(thisValue)); |
264 | if (UNLIKELY(!prototype)) |
265 | return throwVMTypeError(state, throwScope); |
266 | return JSValue::encode(JSHTMLAnchorElement::getConstructor(state->vm(), prototype->globalObject())); |
267 | } |
268 | |
269 | bool setJSHTMLAnchorElementConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
270 | { |
271 | VM& vm = state->vm(); |
272 | auto throwScope = DECLARE_THROW_SCOPE(vm); |
273 | auto* prototype = jsDynamicCast<JSHTMLAnchorElementPrototype*>(vm, JSValue::decode(thisValue)); |
274 | if (UNLIKELY(!prototype)) { |
275 | throwVMTypeError(state, throwScope); |
276 | return false; |
277 | } |
278 | // Shadowing a built-in constructor |
279 | return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue)); |
280 | } |
281 | |
282 | static inline JSValue jsHTMLAnchorElementAdcampaignidGetter(ExecState& state, JSHTMLAnchorElement& thisObject, ThrowScope& throwScope) |
283 | { |
284 | UNUSED_PARAM(throwScope); |
285 | UNUSED_PARAM(state); |
286 | auto& impl = thisObject.wrapped(); |
287 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::adcampaignidAttr)); |
288 | return result; |
289 | } |
290 | |
291 | EncodedJSValue jsHTMLAnchorElementAdcampaignid(ExecState* state, EncodedJSValue thisValue, PropertyName) |
292 | { |
293 | return IDLAttribute<JSHTMLAnchorElement>::get<jsHTMLAnchorElementAdcampaignidGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "adcampaignid" ); |
294 | } |
295 | |
296 | static inline bool setJSHTMLAnchorElementAdcampaignidSetter(ExecState& state, JSHTMLAnchorElement& thisObject, JSValue value, ThrowScope& throwScope) |
297 | { |
298 | UNUSED_PARAM(throwScope); |
299 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
300 | auto& impl = thisObject.wrapped(); |
301 | auto nativeValue = convert<IDLDOMString>(state, value); |
302 | RETURN_IF_EXCEPTION(throwScope, false); |
303 | AttributeSetter::call(state, throwScope, [&] { |
304 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::adcampaignidAttr, WTFMove(nativeValue)); |
305 | }); |
306 | return true; |
307 | } |
308 | |
309 | bool setJSHTMLAnchorElementAdcampaignid(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
310 | { |
311 | return IDLAttribute<JSHTMLAnchorElement>::set<setJSHTMLAnchorElementAdcampaignidSetter>(*state, thisValue, encodedValue, "adcampaignid" ); |
312 | } |
313 | |
314 | static inline JSValue jsHTMLAnchorElementAddestinationGetter(ExecState& state, JSHTMLAnchorElement& thisObject, ThrowScope& throwScope) |
315 | { |
316 | UNUSED_PARAM(throwScope); |
317 | UNUSED_PARAM(state); |
318 | auto& impl = thisObject.wrapped(); |
319 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::addestinationAttr)); |
320 | return result; |
321 | } |
322 | |
323 | EncodedJSValue jsHTMLAnchorElementAddestination(ExecState* state, EncodedJSValue thisValue, PropertyName) |
324 | { |
325 | return IDLAttribute<JSHTMLAnchorElement>::get<jsHTMLAnchorElementAddestinationGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "addestination" ); |
326 | } |
327 | |
328 | static inline bool setJSHTMLAnchorElementAddestinationSetter(ExecState& state, JSHTMLAnchorElement& thisObject, JSValue value, ThrowScope& throwScope) |
329 | { |
330 | UNUSED_PARAM(throwScope); |
331 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
332 | auto& impl = thisObject.wrapped(); |
333 | auto nativeValue = convert<IDLDOMString>(state, value); |
334 | RETURN_IF_EXCEPTION(throwScope, false); |
335 | AttributeSetter::call(state, throwScope, [&] { |
336 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::addestinationAttr, WTFMove(nativeValue)); |
337 | }); |
338 | return true; |
339 | } |
340 | |
341 | bool setJSHTMLAnchorElementAddestination(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
342 | { |
343 | return IDLAttribute<JSHTMLAnchorElement>::set<setJSHTMLAnchorElementAddestinationSetter>(*state, thisValue, encodedValue, "addestination" ); |
344 | } |
345 | |
346 | static inline JSValue jsHTMLAnchorElementCharsetGetter(ExecState& state, JSHTMLAnchorElement& thisObject, ThrowScope& throwScope) |
347 | { |
348 | UNUSED_PARAM(throwScope); |
349 | UNUSED_PARAM(state); |
350 | auto& impl = thisObject.wrapped(); |
351 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::charsetAttr)); |
352 | return result; |
353 | } |
354 | |
355 | EncodedJSValue jsHTMLAnchorElementCharset(ExecState* state, EncodedJSValue thisValue, PropertyName) |
356 | { |
357 | return IDLAttribute<JSHTMLAnchorElement>::get<jsHTMLAnchorElementCharsetGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "charset" ); |
358 | } |
359 | |
360 | static inline bool setJSHTMLAnchorElementCharsetSetter(ExecState& state, JSHTMLAnchorElement& thisObject, JSValue value, ThrowScope& throwScope) |
361 | { |
362 | UNUSED_PARAM(throwScope); |
363 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
364 | auto& impl = thisObject.wrapped(); |
365 | auto nativeValue = convert<IDLDOMString>(state, value); |
366 | RETURN_IF_EXCEPTION(throwScope, false); |
367 | AttributeSetter::call(state, throwScope, [&] { |
368 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::charsetAttr, WTFMove(nativeValue)); |
369 | }); |
370 | return true; |
371 | } |
372 | |
373 | bool setJSHTMLAnchorElementCharset(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
374 | { |
375 | return IDLAttribute<JSHTMLAnchorElement>::set<setJSHTMLAnchorElementCharsetSetter>(*state, thisValue, encodedValue, "charset" ); |
376 | } |
377 | |
378 | static inline JSValue jsHTMLAnchorElementCoordsGetter(ExecState& state, JSHTMLAnchorElement& thisObject, ThrowScope& throwScope) |
379 | { |
380 | UNUSED_PARAM(throwScope); |
381 | UNUSED_PARAM(state); |
382 | auto& impl = thisObject.wrapped(); |
383 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::coordsAttr)); |
384 | return result; |
385 | } |
386 | |
387 | EncodedJSValue jsHTMLAnchorElementCoords(ExecState* state, EncodedJSValue thisValue, PropertyName) |
388 | { |
389 | return IDLAttribute<JSHTMLAnchorElement>::get<jsHTMLAnchorElementCoordsGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "coords" ); |
390 | } |
391 | |
392 | static inline bool setJSHTMLAnchorElementCoordsSetter(ExecState& state, JSHTMLAnchorElement& thisObject, JSValue value, ThrowScope& throwScope) |
393 | { |
394 | UNUSED_PARAM(throwScope); |
395 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
396 | auto& impl = thisObject.wrapped(); |
397 | auto nativeValue = convert<IDLDOMString>(state, value); |
398 | RETURN_IF_EXCEPTION(throwScope, false); |
399 | AttributeSetter::call(state, throwScope, [&] { |
400 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::coordsAttr, WTFMove(nativeValue)); |
401 | }); |
402 | return true; |
403 | } |
404 | |
405 | bool setJSHTMLAnchorElementCoords(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
406 | { |
407 | return IDLAttribute<JSHTMLAnchorElement>::set<setJSHTMLAnchorElementCoordsSetter>(*state, thisValue, encodedValue, "coords" ); |
408 | } |
409 | |
410 | #if ENABLE(DOWNLOAD_ATTRIBUTE) |
411 | static inline JSValue jsHTMLAnchorElementDownloadGetter(ExecState& state, JSHTMLAnchorElement& thisObject, ThrowScope& throwScope) |
412 | { |
413 | UNUSED_PARAM(throwScope); |
414 | UNUSED_PARAM(state); |
415 | auto& impl = thisObject.wrapped(); |
416 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::downloadAttr)); |
417 | return result; |
418 | } |
419 | |
420 | EncodedJSValue jsHTMLAnchorElementDownload(ExecState* state, EncodedJSValue thisValue, PropertyName) |
421 | { |
422 | return IDLAttribute<JSHTMLAnchorElement>::get<jsHTMLAnchorElementDownloadGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "download" ); |
423 | } |
424 | |
425 | #endif |
426 | |
427 | #if ENABLE(DOWNLOAD_ATTRIBUTE) |
428 | static inline bool setJSHTMLAnchorElementDownloadSetter(ExecState& state, JSHTMLAnchorElement& thisObject, JSValue value, ThrowScope& throwScope) |
429 | { |
430 | UNUSED_PARAM(throwScope); |
431 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
432 | auto& impl = thisObject.wrapped(); |
433 | auto nativeValue = convert<IDLDOMString>(state, value); |
434 | RETURN_IF_EXCEPTION(throwScope, false); |
435 | AttributeSetter::call(state, throwScope, [&] { |
436 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::downloadAttr, WTFMove(nativeValue)); |
437 | }); |
438 | return true; |
439 | } |
440 | |
441 | bool setJSHTMLAnchorElementDownload(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
442 | { |
443 | return IDLAttribute<JSHTMLAnchorElement>::set<setJSHTMLAnchorElementDownloadSetter>(*state, thisValue, encodedValue, "download" ); |
444 | } |
445 | |
446 | #endif |
447 | |
448 | static inline JSValue jsHTMLAnchorElementHreflangGetter(ExecState& state, JSHTMLAnchorElement& thisObject, ThrowScope& throwScope) |
449 | { |
450 | UNUSED_PARAM(throwScope); |
451 | UNUSED_PARAM(state); |
452 | auto& impl = thisObject.wrapped(); |
453 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::hreflangAttr)); |
454 | return result; |
455 | } |
456 | |
457 | EncodedJSValue jsHTMLAnchorElementHreflang(ExecState* state, EncodedJSValue thisValue, PropertyName) |
458 | { |
459 | return IDLAttribute<JSHTMLAnchorElement>::get<jsHTMLAnchorElementHreflangGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "hreflang" ); |
460 | } |
461 | |
462 | static inline bool setJSHTMLAnchorElementHreflangSetter(ExecState& state, JSHTMLAnchorElement& thisObject, JSValue value, ThrowScope& throwScope) |
463 | { |
464 | UNUSED_PARAM(throwScope); |
465 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
466 | auto& impl = thisObject.wrapped(); |
467 | auto nativeValue = convert<IDLDOMString>(state, value); |
468 | RETURN_IF_EXCEPTION(throwScope, false); |
469 | AttributeSetter::call(state, throwScope, [&] { |
470 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::hreflangAttr, WTFMove(nativeValue)); |
471 | }); |
472 | return true; |
473 | } |
474 | |
475 | bool setJSHTMLAnchorElementHreflang(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
476 | { |
477 | return IDLAttribute<JSHTMLAnchorElement>::set<setJSHTMLAnchorElementHreflangSetter>(*state, thisValue, encodedValue, "hreflang" ); |
478 | } |
479 | |
480 | static inline JSValue jsHTMLAnchorElementNameGetter(ExecState& state, JSHTMLAnchorElement& thisObject, ThrowScope& throwScope) |
481 | { |
482 | UNUSED_PARAM(throwScope); |
483 | UNUSED_PARAM(state); |
484 | auto& impl = thisObject.wrapped(); |
485 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.getNameAttribute()); |
486 | return result; |
487 | } |
488 | |
489 | EncodedJSValue jsHTMLAnchorElementName(ExecState* state, EncodedJSValue thisValue, PropertyName) |
490 | { |
491 | return IDLAttribute<JSHTMLAnchorElement>::get<jsHTMLAnchorElementNameGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "name" ); |
492 | } |
493 | |
494 | static inline bool setJSHTMLAnchorElementNameSetter(ExecState& state, JSHTMLAnchorElement& thisObject, JSValue value, ThrowScope& throwScope) |
495 | { |
496 | UNUSED_PARAM(throwScope); |
497 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
498 | auto& impl = thisObject.wrapped(); |
499 | auto nativeValue = convert<IDLDOMString>(state, value); |
500 | RETURN_IF_EXCEPTION(throwScope, false); |
501 | AttributeSetter::call(state, throwScope, [&] { |
502 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::nameAttr, WTFMove(nativeValue)); |
503 | }); |
504 | return true; |
505 | } |
506 | |
507 | bool setJSHTMLAnchorElementName(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
508 | { |
509 | return IDLAttribute<JSHTMLAnchorElement>::set<setJSHTMLAnchorElementNameSetter>(*state, thisValue, encodedValue, "name" ); |
510 | } |
511 | |
512 | static inline JSValue jsHTMLAnchorElementPingGetter(ExecState& state, JSHTMLAnchorElement& thisObject, ThrowScope& throwScope) |
513 | { |
514 | UNUSED_PARAM(throwScope); |
515 | UNUSED_PARAM(state); |
516 | auto& impl = thisObject.wrapped(); |
517 | JSValue result = toJS<IDLUSVString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::pingAttr)); |
518 | return result; |
519 | } |
520 | |
521 | EncodedJSValue jsHTMLAnchorElementPing(ExecState* state, EncodedJSValue thisValue, PropertyName) |
522 | { |
523 | return IDLAttribute<JSHTMLAnchorElement>::get<jsHTMLAnchorElementPingGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "ping" ); |
524 | } |
525 | |
526 | static inline bool setJSHTMLAnchorElementPingSetter(ExecState& state, JSHTMLAnchorElement& thisObject, JSValue value, ThrowScope& throwScope) |
527 | { |
528 | UNUSED_PARAM(throwScope); |
529 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
530 | auto& impl = thisObject.wrapped(); |
531 | auto nativeValue = convert<IDLUSVString>(state, value); |
532 | RETURN_IF_EXCEPTION(throwScope, false); |
533 | AttributeSetter::call(state, throwScope, [&] { |
534 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::pingAttr, WTFMove(nativeValue)); |
535 | }); |
536 | return true; |
537 | } |
538 | |
539 | bool setJSHTMLAnchorElementPing(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
540 | { |
541 | return IDLAttribute<JSHTMLAnchorElement>::set<setJSHTMLAnchorElementPingSetter>(*state, thisValue, encodedValue, "ping" ); |
542 | } |
543 | |
544 | static inline JSValue jsHTMLAnchorElementRelGetter(ExecState& state, JSHTMLAnchorElement& thisObject, ThrowScope& throwScope) |
545 | { |
546 | UNUSED_PARAM(throwScope); |
547 | UNUSED_PARAM(state); |
548 | auto& impl = thisObject.wrapped(); |
549 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::relAttr)); |
550 | return result; |
551 | } |
552 | |
553 | EncodedJSValue jsHTMLAnchorElementRel(ExecState* state, EncodedJSValue thisValue, PropertyName) |
554 | { |
555 | return IDLAttribute<JSHTMLAnchorElement>::get<jsHTMLAnchorElementRelGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "rel" ); |
556 | } |
557 | |
558 | static inline bool setJSHTMLAnchorElementRelSetter(ExecState& state, JSHTMLAnchorElement& thisObject, JSValue value, ThrowScope& throwScope) |
559 | { |
560 | UNUSED_PARAM(throwScope); |
561 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
562 | auto& impl = thisObject.wrapped(); |
563 | auto nativeValue = convert<IDLDOMString>(state, value); |
564 | RETURN_IF_EXCEPTION(throwScope, false); |
565 | AttributeSetter::call(state, throwScope, [&] { |
566 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::relAttr, WTFMove(nativeValue)); |
567 | }); |
568 | return true; |
569 | } |
570 | |
571 | bool setJSHTMLAnchorElementRel(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
572 | { |
573 | return IDLAttribute<JSHTMLAnchorElement>::set<setJSHTMLAnchorElementRelSetter>(*state, thisValue, encodedValue, "rel" ); |
574 | } |
575 | |
576 | static inline JSValue jsHTMLAnchorElementRevGetter(ExecState& state, JSHTMLAnchorElement& thisObject, ThrowScope& throwScope) |
577 | { |
578 | UNUSED_PARAM(throwScope); |
579 | UNUSED_PARAM(state); |
580 | auto& impl = thisObject.wrapped(); |
581 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::revAttr)); |
582 | return result; |
583 | } |
584 | |
585 | EncodedJSValue jsHTMLAnchorElementRev(ExecState* state, EncodedJSValue thisValue, PropertyName) |
586 | { |
587 | return IDLAttribute<JSHTMLAnchorElement>::get<jsHTMLAnchorElementRevGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "rev" ); |
588 | } |
589 | |
590 | static inline bool setJSHTMLAnchorElementRevSetter(ExecState& state, JSHTMLAnchorElement& thisObject, JSValue value, ThrowScope& throwScope) |
591 | { |
592 | UNUSED_PARAM(throwScope); |
593 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
594 | auto& impl = thisObject.wrapped(); |
595 | auto nativeValue = convert<IDLDOMString>(state, value); |
596 | RETURN_IF_EXCEPTION(throwScope, false); |
597 | AttributeSetter::call(state, throwScope, [&] { |
598 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::revAttr, WTFMove(nativeValue)); |
599 | }); |
600 | return true; |
601 | } |
602 | |
603 | bool setJSHTMLAnchorElementRev(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
604 | { |
605 | return IDLAttribute<JSHTMLAnchorElement>::set<setJSHTMLAnchorElementRevSetter>(*state, thisValue, encodedValue, "rev" ); |
606 | } |
607 | |
608 | static inline JSValue jsHTMLAnchorElementShapeGetter(ExecState& state, JSHTMLAnchorElement& thisObject, ThrowScope& throwScope) |
609 | { |
610 | UNUSED_PARAM(throwScope); |
611 | UNUSED_PARAM(state); |
612 | auto& impl = thisObject.wrapped(); |
613 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::shapeAttr)); |
614 | return result; |
615 | } |
616 | |
617 | EncodedJSValue jsHTMLAnchorElementShape(ExecState* state, EncodedJSValue thisValue, PropertyName) |
618 | { |
619 | return IDLAttribute<JSHTMLAnchorElement>::get<jsHTMLAnchorElementShapeGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "shape" ); |
620 | } |
621 | |
622 | static inline bool setJSHTMLAnchorElementShapeSetter(ExecState& state, JSHTMLAnchorElement& thisObject, JSValue value, ThrowScope& throwScope) |
623 | { |
624 | UNUSED_PARAM(throwScope); |
625 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
626 | auto& impl = thisObject.wrapped(); |
627 | auto nativeValue = convert<IDLDOMString>(state, value); |
628 | RETURN_IF_EXCEPTION(throwScope, false); |
629 | AttributeSetter::call(state, throwScope, [&] { |
630 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::shapeAttr, WTFMove(nativeValue)); |
631 | }); |
632 | return true; |
633 | } |
634 | |
635 | bool setJSHTMLAnchorElementShape(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
636 | { |
637 | return IDLAttribute<JSHTMLAnchorElement>::set<setJSHTMLAnchorElementShapeSetter>(*state, thisValue, encodedValue, "shape" ); |
638 | } |
639 | |
640 | static inline JSValue jsHTMLAnchorElementTargetGetter(ExecState& state, JSHTMLAnchorElement& thisObject, ThrowScope& throwScope) |
641 | { |
642 | UNUSED_PARAM(throwScope); |
643 | UNUSED_PARAM(state); |
644 | auto& impl = thisObject.wrapped(); |
645 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::targetAttr)); |
646 | return result; |
647 | } |
648 | |
649 | EncodedJSValue jsHTMLAnchorElementTarget(ExecState* state, EncodedJSValue thisValue, PropertyName) |
650 | { |
651 | return IDLAttribute<JSHTMLAnchorElement>::get<jsHTMLAnchorElementTargetGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "target" ); |
652 | } |
653 | |
654 | static inline bool setJSHTMLAnchorElementTargetSetter(ExecState& state, JSHTMLAnchorElement& thisObject, JSValue value, ThrowScope& throwScope) |
655 | { |
656 | UNUSED_PARAM(throwScope); |
657 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
658 | auto& impl = thisObject.wrapped(); |
659 | auto nativeValue = convert<IDLDOMString>(state, value); |
660 | RETURN_IF_EXCEPTION(throwScope, false); |
661 | AttributeSetter::call(state, throwScope, [&] { |
662 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::targetAttr, WTFMove(nativeValue)); |
663 | }); |
664 | return true; |
665 | } |
666 | |
667 | bool setJSHTMLAnchorElementTarget(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
668 | { |
669 | return IDLAttribute<JSHTMLAnchorElement>::set<setJSHTMLAnchorElementTargetSetter>(*state, thisValue, encodedValue, "target" ); |
670 | } |
671 | |
672 | static inline JSValue jsHTMLAnchorElementTypeGetter(ExecState& state, JSHTMLAnchorElement& thisObject, ThrowScope& throwScope) |
673 | { |
674 | UNUSED_PARAM(throwScope); |
675 | UNUSED_PARAM(state); |
676 | auto& impl = thisObject.wrapped(); |
677 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::typeAttr)); |
678 | return result; |
679 | } |
680 | |
681 | EncodedJSValue jsHTMLAnchorElementType(ExecState* state, EncodedJSValue thisValue, PropertyName) |
682 | { |
683 | return IDLAttribute<JSHTMLAnchorElement>::get<jsHTMLAnchorElementTypeGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "type" ); |
684 | } |
685 | |
686 | static inline bool setJSHTMLAnchorElementTypeSetter(ExecState& state, JSHTMLAnchorElement& thisObject, JSValue value, ThrowScope& throwScope) |
687 | { |
688 | UNUSED_PARAM(throwScope); |
689 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
690 | auto& impl = thisObject.wrapped(); |
691 | auto nativeValue = convert<IDLDOMString>(state, value); |
692 | RETURN_IF_EXCEPTION(throwScope, false); |
693 | AttributeSetter::call(state, throwScope, [&] { |
694 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::typeAttr, WTFMove(nativeValue)); |
695 | }); |
696 | return true; |
697 | } |
698 | |
699 | bool setJSHTMLAnchorElementType(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
700 | { |
701 | return IDLAttribute<JSHTMLAnchorElement>::set<setJSHTMLAnchorElementTypeSetter>(*state, thisValue, encodedValue, "type" ); |
702 | } |
703 | |
704 | static inline JSValue jsHTMLAnchorElementTextGetter(ExecState& state, JSHTMLAnchorElement& thisObject, ThrowScope& throwScope) |
705 | { |
706 | UNUSED_PARAM(throwScope); |
707 | UNUSED_PARAM(state); |
708 | auto& impl = thisObject.wrapped(); |
709 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.text()); |
710 | return result; |
711 | } |
712 | |
713 | EncodedJSValue jsHTMLAnchorElementText(ExecState* state, EncodedJSValue thisValue, PropertyName) |
714 | { |
715 | return IDLAttribute<JSHTMLAnchorElement>::get<jsHTMLAnchorElementTextGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "text" ); |
716 | } |
717 | |
718 | static inline bool setJSHTMLAnchorElementTextSetter(ExecState& state, JSHTMLAnchorElement& thisObject, JSValue value, ThrowScope& throwScope) |
719 | { |
720 | UNUSED_PARAM(throwScope); |
721 | CustomElementReactionStack customElementReactionStack(state); |
722 | auto& impl = thisObject.wrapped(); |
723 | auto nativeValue = convert<IDLDOMString>(state, value); |
724 | RETURN_IF_EXCEPTION(throwScope, false); |
725 | AttributeSetter::call(state, throwScope, [&] { |
726 | return impl.setText(WTFMove(nativeValue)); |
727 | }); |
728 | return true; |
729 | } |
730 | |
731 | bool setJSHTMLAnchorElementText(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
732 | { |
733 | return IDLAttribute<JSHTMLAnchorElement>::set<setJSHTMLAnchorElementTextSetter>(*state, thisValue, encodedValue, "text" ); |
734 | } |
735 | |
736 | static inline JSValue jsHTMLAnchorElementRelListGetter(ExecState& state, JSHTMLAnchorElement& thisObject, ThrowScope& throwScope) |
737 | { |
738 | UNUSED_PARAM(throwScope); |
739 | UNUSED_PARAM(state); |
740 | auto& impl = thisObject.wrapped(); |
741 | JSValue result = toJS<IDLInterface<DOMTokenList>>(state, *thisObject.globalObject(), throwScope, impl.relList()); |
742 | return result; |
743 | } |
744 | |
745 | EncodedJSValue jsHTMLAnchorElementRelList(ExecState* state, EncodedJSValue thisValue, PropertyName) |
746 | { |
747 | return IDLAttribute<JSHTMLAnchorElement>::get<jsHTMLAnchorElementRelListGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "relList" ); |
748 | } |
749 | |
750 | static inline bool setJSHTMLAnchorElementRelListSetter(ExecState& state, JSHTMLAnchorElement& thisObject, JSValue value, ThrowScope& throwScope) |
751 | { |
752 | UNUSED_PARAM(throwScope); |
753 | auto id = Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("relList" ), strlen("relList" )); |
754 | auto valueToForwardTo = thisObject.get(&state, id); |
755 | RETURN_IF_EXCEPTION(throwScope, false); |
756 | if (UNLIKELY(!valueToForwardTo.isObject())) { |
757 | throwTypeError(&state, throwScope); |
758 | return false; |
759 | } |
760 | auto forwardId = Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("value" ), strlen("value" )); |
761 | PutPropertySlot slot(valueToForwardTo, false); |
762 | asObject(valueToForwardTo)->methodTable(state.vm())->put(asObject(valueToForwardTo), &state, forwardId, value, slot); |
763 | RETURN_IF_EXCEPTION(throwScope, false); |
764 | return true; |
765 | } |
766 | |
767 | bool setJSHTMLAnchorElementRelList(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
768 | { |
769 | return IDLAttribute<JSHTMLAnchorElement>::set<setJSHTMLAnchorElementRelListSetter>(*state, thisValue, encodedValue, "relList" ); |
770 | } |
771 | |
772 | static inline JSValue jsHTMLAnchorElementHrefGetter(ExecState& state, JSHTMLAnchorElement& thisObject, ThrowScope& throwScope) |
773 | { |
774 | UNUSED_PARAM(throwScope); |
775 | UNUSED_PARAM(state); |
776 | auto& impl = thisObject.wrapped(); |
777 | JSValue result = toJS<IDLUSVString>(state, throwScope, impl.getURLAttribute(WebCore::HTMLNames::hrefAttr)); |
778 | return result; |
779 | } |
780 | |
781 | EncodedJSValue jsHTMLAnchorElementHref(ExecState* state, EncodedJSValue thisValue, PropertyName) |
782 | { |
783 | return IDLAttribute<JSHTMLAnchorElement>::get<jsHTMLAnchorElementHrefGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "href" ); |
784 | } |
785 | |
786 | static inline bool setJSHTMLAnchorElementHrefSetter(ExecState& state, JSHTMLAnchorElement& thisObject, JSValue value, ThrowScope& throwScope) |
787 | { |
788 | UNUSED_PARAM(throwScope); |
789 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
790 | auto& impl = thisObject.wrapped(); |
791 | auto nativeValue = convert<IDLUSVString>(state, value); |
792 | RETURN_IF_EXCEPTION(throwScope, false); |
793 | AttributeSetter::call(state, throwScope, [&] { |
794 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::hrefAttr, WTFMove(nativeValue)); |
795 | }); |
796 | return true; |
797 | } |
798 | |
799 | bool setJSHTMLAnchorElementHref(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
800 | { |
801 | return IDLAttribute<JSHTMLAnchorElement>::set<setJSHTMLAnchorElementHrefSetter>(*state, thisValue, encodedValue, "href" ); |
802 | } |
803 | |
804 | static inline JSValue jsHTMLAnchorElementOriginGetter(ExecState& state, JSHTMLAnchorElement& thisObject, ThrowScope& throwScope) |
805 | { |
806 | UNUSED_PARAM(throwScope); |
807 | UNUSED_PARAM(state); |
808 | auto& impl = thisObject.wrapped(); |
809 | JSValue result = toJS<IDLUSVString>(state, throwScope, impl.origin()); |
810 | return result; |
811 | } |
812 | |
813 | EncodedJSValue jsHTMLAnchorElementOrigin(ExecState* state, EncodedJSValue thisValue, PropertyName) |
814 | { |
815 | return IDLAttribute<JSHTMLAnchorElement>::get<jsHTMLAnchorElementOriginGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "origin" ); |
816 | } |
817 | |
818 | static inline JSValue jsHTMLAnchorElementProtocolGetter(ExecState& state, JSHTMLAnchorElement& thisObject, ThrowScope& throwScope) |
819 | { |
820 | UNUSED_PARAM(throwScope); |
821 | UNUSED_PARAM(state); |
822 | auto& impl = thisObject.wrapped(); |
823 | JSValue result = toJS<IDLUSVString>(state, throwScope, impl.protocol()); |
824 | return result; |
825 | } |
826 | |
827 | EncodedJSValue jsHTMLAnchorElementProtocol(ExecState* state, EncodedJSValue thisValue, PropertyName) |
828 | { |
829 | return IDLAttribute<JSHTMLAnchorElement>::get<jsHTMLAnchorElementProtocolGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "protocol" ); |
830 | } |
831 | |
832 | static inline bool setJSHTMLAnchorElementProtocolSetter(ExecState& state, JSHTMLAnchorElement& thisObject, JSValue value, ThrowScope& throwScope) |
833 | { |
834 | UNUSED_PARAM(throwScope); |
835 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
836 | auto& impl = thisObject.wrapped(); |
837 | auto nativeValue = convert<IDLUSVString>(state, value); |
838 | RETURN_IF_EXCEPTION(throwScope, false); |
839 | AttributeSetter::call(state, throwScope, [&] { |
840 | return impl.setProtocol(WTFMove(nativeValue)); |
841 | }); |
842 | return true; |
843 | } |
844 | |
845 | bool setJSHTMLAnchorElementProtocol(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
846 | { |
847 | return IDLAttribute<JSHTMLAnchorElement>::set<setJSHTMLAnchorElementProtocolSetter>(*state, thisValue, encodedValue, "protocol" ); |
848 | } |
849 | |
850 | static inline JSValue jsHTMLAnchorElementUsernameGetter(ExecState& state, JSHTMLAnchorElement& thisObject, ThrowScope& throwScope) |
851 | { |
852 | UNUSED_PARAM(throwScope); |
853 | UNUSED_PARAM(state); |
854 | auto& impl = thisObject.wrapped(); |
855 | JSValue result = toJS<IDLUSVString>(state, throwScope, impl.username()); |
856 | return result; |
857 | } |
858 | |
859 | EncodedJSValue jsHTMLAnchorElementUsername(ExecState* state, EncodedJSValue thisValue, PropertyName) |
860 | { |
861 | return IDLAttribute<JSHTMLAnchorElement>::get<jsHTMLAnchorElementUsernameGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "username" ); |
862 | } |
863 | |
864 | static inline bool setJSHTMLAnchorElementUsernameSetter(ExecState& state, JSHTMLAnchorElement& thisObject, JSValue value, ThrowScope& throwScope) |
865 | { |
866 | UNUSED_PARAM(throwScope); |
867 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
868 | auto& impl = thisObject.wrapped(); |
869 | auto nativeValue = convert<IDLUSVString>(state, value); |
870 | RETURN_IF_EXCEPTION(throwScope, false); |
871 | AttributeSetter::call(state, throwScope, [&] { |
872 | return impl.setUsername(WTFMove(nativeValue)); |
873 | }); |
874 | return true; |
875 | } |
876 | |
877 | bool setJSHTMLAnchorElementUsername(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
878 | { |
879 | return IDLAttribute<JSHTMLAnchorElement>::set<setJSHTMLAnchorElementUsernameSetter>(*state, thisValue, encodedValue, "username" ); |
880 | } |
881 | |
882 | static inline JSValue jsHTMLAnchorElementPasswordGetter(ExecState& state, JSHTMLAnchorElement& thisObject, ThrowScope& throwScope) |
883 | { |
884 | UNUSED_PARAM(throwScope); |
885 | UNUSED_PARAM(state); |
886 | auto& impl = thisObject.wrapped(); |
887 | JSValue result = toJS<IDLUSVString>(state, throwScope, impl.password()); |
888 | return result; |
889 | } |
890 | |
891 | EncodedJSValue jsHTMLAnchorElementPassword(ExecState* state, EncodedJSValue thisValue, PropertyName) |
892 | { |
893 | return IDLAttribute<JSHTMLAnchorElement>::get<jsHTMLAnchorElementPasswordGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "password" ); |
894 | } |
895 | |
896 | static inline bool setJSHTMLAnchorElementPasswordSetter(ExecState& state, JSHTMLAnchorElement& thisObject, JSValue value, ThrowScope& throwScope) |
897 | { |
898 | UNUSED_PARAM(throwScope); |
899 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
900 | auto& impl = thisObject.wrapped(); |
901 | auto nativeValue = convert<IDLUSVString>(state, value); |
902 | RETURN_IF_EXCEPTION(throwScope, false); |
903 | AttributeSetter::call(state, throwScope, [&] { |
904 | return impl.setPassword(WTFMove(nativeValue)); |
905 | }); |
906 | return true; |
907 | } |
908 | |
909 | bool setJSHTMLAnchorElementPassword(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
910 | { |
911 | return IDLAttribute<JSHTMLAnchorElement>::set<setJSHTMLAnchorElementPasswordSetter>(*state, thisValue, encodedValue, "password" ); |
912 | } |
913 | |
914 | static inline JSValue jsHTMLAnchorElementHostGetter(ExecState& state, JSHTMLAnchorElement& thisObject, ThrowScope& throwScope) |
915 | { |
916 | UNUSED_PARAM(throwScope); |
917 | UNUSED_PARAM(state); |
918 | auto& impl = thisObject.wrapped(); |
919 | JSValue result = toJS<IDLUSVString>(state, throwScope, impl.host()); |
920 | return result; |
921 | } |
922 | |
923 | EncodedJSValue jsHTMLAnchorElementHost(ExecState* state, EncodedJSValue thisValue, PropertyName) |
924 | { |
925 | return IDLAttribute<JSHTMLAnchorElement>::get<jsHTMLAnchorElementHostGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "host" ); |
926 | } |
927 | |
928 | static inline bool setJSHTMLAnchorElementHostSetter(ExecState& state, JSHTMLAnchorElement& thisObject, JSValue value, ThrowScope& throwScope) |
929 | { |
930 | UNUSED_PARAM(throwScope); |
931 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
932 | auto& impl = thisObject.wrapped(); |
933 | auto nativeValue = convert<IDLUSVString>(state, value); |
934 | RETURN_IF_EXCEPTION(throwScope, false); |
935 | AttributeSetter::call(state, throwScope, [&] { |
936 | return impl.setHost(WTFMove(nativeValue)); |
937 | }); |
938 | return true; |
939 | } |
940 | |
941 | bool setJSHTMLAnchorElementHost(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
942 | { |
943 | return IDLAttribute<JSHTMLAnchorElement>::set<setJSHTMLAnchorElementHostSetter>(*state, thisValue, encodedValue, "host" ); |
944 | } |
945 | |
946 | static inline JSValue jsHTMLAnchorElementHostnameGetter(ExecState& state, JSHTMLAnchorElement& thisObject, ThrowScope& throwScope) |
947 | { |
948 | UNUSED_PARAM(throwScope); |
949 | UNUSED_PARAM(state); |
950 | auto& impl = thisObject.wrapped(); |
951 | JSValue result = toJS<IDLUSVString>(state, throwScope, impl.hostname()); |
952 | return result; |
953 | } |
954 | |
955 | EncodedJSValue jsHTMLAnchorElementHostname(ExecState* state, EncodedJSValue thisValue, PropertyName) |
956 | { |
957 | return IDLAttribute<JSHTMLAnchorElement>::get<jsHTMLAnchorElementHostnameGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "hostname" ); |
958 | } |
959 | |
960 | static inline bool setJSHTMLAnchorElementHostnameSetter(ExecState& state, JSHTMLAnchorElement& thisObject, JSValue value, ThrowScope& throwScope) |
961 | { |
962 | UNUSED_PARAM(throwScope); |
963 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
964 | auto& impl = thisObject.wrapped(); |
965 | auto nativeValue = convert<IDLUSVString>(state, value); |
966 | RETURN_IF_EXCEPTION(throwScope, false); |
967 | AttributeSetter::call(state, throwScope, [&] { |
968 | return impl.setHostname(WTFMove(nativeValue)); |
969 | }); |
970 | return true; |
971 | } |
972 | |
973 | bool setJSHTMLAnchorElementHostname(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
974 | { |
975 | return IDLAttribute<JSHTMLAnchorElement>::set<setJSHTMLAnchorElementHostnameSetter>(*state, thisValue, encodedValue, "hostname" ); |
976 | } |
977 | |
978 | static inline JSValue jsHTMLAnchorElementPortGetter(ExecState& state, JSHTMLAnchorElement& thisObject, ThrowScope& throwScope) |
979 | { |
980 | UNUSED_PARAM(throwScope); |
981 | UNUSED_PARAM(state); |
982 | auto& impl = thisObject.wrapped(); |
983 | JSValue result = toJS<IDLUSVString>(state, throwScope, impl.port()); |
984 | return result; |
985 | } |
986 | |
987 | EncodedJSValue jsHTMLAnchorElementPort(ExecState* state, EncodedJSValue thisValue, PropertyName) |
988 | { |
989 | return IDLAttribute<JSHTMLAnchorElement>::get<jsHTMLAnchorElementPortGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "port" ); |
990 | } |
991 | |
992 | static inline bool setJSHTMLAnchorElementPortSetter(ExecState& state, JSHTMLAnchorElement& thisObject, JSValue value, ThrowScope& throwScope) |
993 | { |
994 | UNUSED_PARAM(throwScope); |
995 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
996 | auto& impl = thisObject.wrapped(); |
997 | auto nativeValue = convert<IDLUSVString>(state, value); |
998 | RETURN_IF_EXCEPTION(throwScope, false); |
999 | AttributeSetter::call(state, throwScope, [&] { |
1000 | return impl.setPort(WTFMove(nativeValue)); |
1001 | }); |
1002 | return true; |
1003 | } |
1004 | |
1005 | bool setJSHTMLAnchorElementPort(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
1006 | { |
1007 | return IDLAttribute<JSHTMLAnchorElement>::set<setJSHTMLAnchorElementPortSetter>(*state, thisValue, encodedValue, "port" ); |
1008 | } |
1009 | |
1010 | static inline JSValue jsHTMLAnchorElementPathnameGetter(ExecState& state, JSHTMLAnchorElement& thisObject, ThrowScope& throwScope) |
1011 | { |
1012 | UNUSED_PARAM(throwScope); |
1013 | UNUSED_PARAM(state); |
1014 | auto& impl = thisObject.wrapped(); |
1015 | JSValue result = toJS<IDLUSVString>(state, throwScope, impl.pathname()); |
1016 | return result; |
1017 | } |
1018 | |
1019 | EncodedJSValue jsHTMLAnchorElementPathname(ExecState* state, EncodedJSValue thisValue, PropertyName) |
1020 | { |
1021 | return IDLAttribute<JSHTMLAnchorElement>::get<jsHTMLAnchorElementPathnameGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "pathname" ); |
1022 | } |
1023 | |
1024 | static inline bool setJSHTMLAnchorElementPathnameSetter(ExecState& state, JSHTMLAnchorElement& thisObject, JSValue value, ThrowScope& throwScope) |
1025 | { |
1026 | UNUSED_PARAM(throwScope); |
1027 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
1028 | auto& impl = thisObject.wrapped(); |
1029 | auto nativeValue = convert<IDLUSVString>(state, value); |
1030 | RETURN_IF_EXCEPTION(throwScope, false); |
1031 | AttributeSetter::call(state, throwScope, [&] { |
1032 | return impl.setPathname(WTFMove(nativeValue)); |
1033 | }); |
1034 | return true; |
1035 | } |
1036 | |
1037 | bool setJSHTMLAnchorElementPathname(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
1038 | { |
1039 | return IDLAttribute<JSHTMLAnchorElement>::set<setJSHTMLAnchorElementPathnameSetter>(*state, thisValue, encodedValue, "pathname" ); |
1040 | } |
1041 | |
1042 | static inline JSValue jsHTMLAnchorElementSearchGetter(ExecState& state, JSHTMLAnchorElement& thisObject, ThrowScope& throwScope) |
1043 | { |
1044 | UNUSED_PARAM(throwScope); |
1045 | UNUSED_PARAM(state); |
1046 | auto& impl = thisObject.wrapped(); |
1047 | JSValue result = toJS<IDLUSVString>(state, throwScope, impl.search()); |
1048 | return result; |
1049 | } |
1050 | |
1051 | EncodedJSValue jsHTMLAnchorElementSearch(ExecState* state, EncodedJSValue thisValue, PropertyName) |
1052 | { |
1053 | return IDLAttribute<JSHTMLAnchorElement>::get<jsHTMLAnchorElementSearchGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "search" ); |
1054 | } |
1055 | |
1056 | static inline bool setJSHTMLAnchorElementSearchSetter(ExecState& state, JSHTMLAnchorElement& thisObject, JSValue value, ThrowScope& throwScope) |
1057 | { |
1058 | UNUSED_PARAM(throwScope); |
1059 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
1060 | auto& impl = thisObject.wrapped(); |
1061 | auto nativeValue = convert<IDLUSVString>(state, value); |
1062 | RETURN_IF_EXCEPTION(throwScope, false); |
1063 | AttributeSetter::call(state, throwScope, [&] { |
1064 | return impl.setSearch(WTFMove(nativeValue)); |
1065 | }); |
1066 | return true; |
1067 | } |
1068 | |
1069 | bool setJSHTMLAnchorElementSearch(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
1070 | { |
1071 | return IDLAttribute<JSHTMLAnchorElement>::set<setJSHTMLAnchorElementSearchSetter>(*state, thisValue, encodedValue, "search" ); |
1072 | } |
1073 | |
1074 | static inline JSValue jsHTMLAnchorElementHashGetter(ExecState& state, JSHTMLAnchorElement& thisObject, ThrowScope& throwScope) |
1075 | { |
1076 | UNUSED_PARAM(throwScope); |
1077 | UNUSED_PARAM(state); |
1078 | auto& impl = thisObject.wrapped(); |
1079 | JSValue result = toJS<IDLUSVString>(state, throwScope, impl.hash()); |
1080 | return result; |
1081 | } |
1082 | |
1083 | EncodedJSValue jsHTMLAnchorElementHash(ExecState* state, EncodedJSValue thisValue, PropertyName) |
1084 | { |
1085 | return IDLAttribute<JSHTMLAnchorElement>::get<jsHTMLAnchorElementHashGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "hash" ); |
1086 | } |
1087 | |
1088 | static inline bool setJSHTMLAnchorElementHashSetter(ExecState& state, JSHTMLAnchorElement& thisObject, JSValue value, ThrowScope& throwScope) |
1089 | { |
1090 | UNUSED_PARAM(throwScope); |
1091 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
1092 | auto& impl = thisObject.wrapped(); |
1093 | auto nativeValue = convert<IDLUSVString>(state, value); |
1094 | RETURN_IF_EXCEPTION(throwScope, false); |
1095 | AttributeSetter::call(state, throwScope, [&] { |
1096 | return impl.setHash(WTFMove(nativeValue)); |
1097 | }); |
1098 | return true; |
1099 | } |
1100 | |
1101 | bool setJSHTMLAnchorElementHash(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
1102 | { |
1103 | return IDLAttribute<JSHTMLAnchorElement>::set<setJSHTMLAnchorElementHashSetter>(*state, thisValue, encodedValue, "hash" ); |
1104 | } |
1105 | |
1106 | static inline JSC::EncodedJSValue jsHTMLAnchorElementPrototypeFunctionToStringBody(JSC::ExecState* state, typename IDLOperation<JSHTMLAnchorElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
1107 | { |
1108 | UNUSED_PARAM(state); |
1109 | UNUSED_PARAM(throwScope); |
1110 | auto& impl = castedThis->wrapped(); |
1111 | return JSValue::encode(toJS<IDLUSVString>(*state, impl.href())); |
1112 | } |
1113 | |
1114 | EncodedJSValue JSC_HOST_CALL jsHTMLAnchorElementPrototypeFunctionToString(ExecState* state) |
1115 | { |
1116 | return IDLOperation<JSHTMLAnchorElement>::call<jsHTMLAnchorElementPrototypeFunctionToStringBody>(*state, "toString" ); |
1117 | } |
1118 | |
1119 | void JSHTMLAnchorElement::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& builder) |
1120 | { |
1121 | auto* thisObject = jsCast<JSHTMLAnchorElement*>(cell); |
1122 | builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); |
1123 | if (thisObject->scriptExecutionContext()) |
1124 | builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); |
1125 | Base::heapSnapshot(cell, builder); |
1126 | } |
1127 | |
1128 | |
1129 | } |
1130 | |