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 "JSHTMLLinkElement.h"
23
24#include "CustomElementReactionQueue.h"
25#include "Document.h"
26#include "HTMLNames.h"
27#include "JSDOMAttribute.h"
28#include "JSDOMBinding.h"
29#include "JSDOMConstructorNotConstructable.h"
30#include "JSDOMConvertBoolean.h"
31#include "JSDOMConvertInterface.h"
32#include "JSDOMConvertNullable.h"
33#include "JSDOMConvertStrings.h"
34#include "JSDOMExceptionHandling.h"
35#include "JSDOMGlobalObject.h"
36#include "JSDOMTokenList.h"
37#include "JSDOMWrapperCache.h"
38#include "JSStyleSheet.h"
39#include "ScriptExecutionContext.h"
40#include "Settings.h"
41#include <JavaScriptCore/HeapSnapshotBuilder.h>
42#include <JavaScriptCore/JSCInlines.h>
43#include <wtf/GetPtr.h>
44#include <wtf/PointerPreparations.h>
45#include <wtf/URL.h>
46
47
48namespace WebCore {
49using namespace JSC;
50
51// Attributes
52
53JSC::EncodedJSValue jsHTMLLinkElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
54bool setJSHTMLLinkElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
55JSC::EncodedJSValue jsHTMLLinkElementDisabled(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
56bool setJSHTMLLinkElementDisabled(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
57JSC::EncodedJSValue jsHTMLLinkElementCharset(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
58bool setJSHTMLLinkElementCharset(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
59JSC::EncodedJSValue jsHTMLLinkElementHref(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
60bool setJSHTMLLinkElementHref(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
61JSC::EncodedJSValue jsHTMLLinkElementHreflang(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
62bool setJSHTMLLinkElementHreflang(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
63JSC::EncodedJSValue jsHTMLLinkElementMedia(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
64bool setJSHTMLLinkElementMedia(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
65JSC::EncodedJSValue jsHTMLLinkElementRel(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
66bool setJSHTMLLinkElementRel(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
67JSC::EncodedJSValue jsHTMLLinkElementRev(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
68bool setJSHTMLLinkElementRev(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
69JSC::EncodedJSValue jsHTMLLinkElementSizes(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
70bool setJSHTMLLinkElementSizes(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
71JSC::EncodedJSValue jsHTMLLinkElementTarget(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
72bool setJSHTMLLinkElementTarget(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
73JSC::EncodedJSValue jsHTMLLinkElementType(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
74bool setJSHTMLLinkElementType(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
75JSC::EncodedJSValue jsHTMLLinkElementAs(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
76bool setJSHTMLLinkElementAs(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
77JSC::EncodedJSValue jsHTMLLinkElementCrossOrigin(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
78bool setJSHTMLLinkElementCrossOrigin(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
79JSC::EncodedJSValue jsHTMLLinkElementImageSrcset(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
80bool setJSHTMLLinkElementImageSrcset(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
81JSC::EncodedJSValue jsHTMLLinkElementImageSizes(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
82bool setJSHTMLLinkElementImageSizes(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
83JSC::EncodedJSValue jsHTMLLinkElementSheet(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
84JSC::EncodedJSValue jsHTMLLinkElementRelList(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
85bool setJSHTMLLinkElementRelList(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
86JSC::EncodedJSValue jsHTMLLinkElementNonce(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
87bool setJSHTMLLinkElementNonce(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
88JSC::EncodedJSValue jsHTMLLinkElementIntegrity(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
89bool setJSHTMLLinkElementIntegrity(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
90
91class JSHTMLLinkElementPrototype : public JSC::JSNonFinalObject {
92public:
93 using Base = JSC::JSNonFinalObject;
94 static JSHTMLLinkElementPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure)
95 {
96 JSHTMLLinkElementPrototype* ptr = new (NotNull, JSC::allocateCell<JSHTMLLinkElementPrototype>(vm.heap)) JSHTMLLinkElementPrototype(vm, globalObject, structure);
97 ptr->finishCreation(vm);
98 return ptr;
99 }
100
101 DECLARE_INFO;
102 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
103 {
104 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
105 }
106
107private:
108 JSHTMLLinkElementPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure)
109 : JSC::JSNonFinalObject(vm, structure)
110 {
111 }
112
113 void finishCreation(JSC::VM&);
114};
115
116using JSHTMLLinkElementConstructor = JSDOMConstructorNotConstructable<JSHTMLLinkElement>;
117
118template<> JSValue JSHTMLLinkElementConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject)
119{
120 return JSHTMLElement::getConstructor(vm, &globalObject);
121}
122
123template<> void JSHTMLLinkElementConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
124{
125 putDirect(vm, vm.propertyNames->prototype, JSHTMLLinkElement::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
126 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("HTMLLinkElement"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
127 putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
128}
129
130template<> const ClassInfo JSHTMLLinkElementConstructor::s_info = { "HTMLLinkElement", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSHTMLLinkElementConstructor) };
131
132/* Hash table for prototype */
133
134static const HashTableValue JSHTMLLinkElementPrototypeTableValues[] =
135{
136 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLLinkElementConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLLinkElementConstructor) } },
137 { "disabled", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLLinkElementDisabled), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLLinkElementDisabled) } },
138 { "charset", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLLinkElementCharset), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLLinkElementCharset) } },
139 { "href", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLLinkElementHref), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLLinkElementHref) } },
140 { "hreflang", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLLinkElementHreflang), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLLinkElementHreflang) } },
141 { "media", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLLinkElementMedia), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLLinkElementMedia) } },
142 { "rel", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLLinkElementRel), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLLinkElementRel) } },
143 { "rev", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLLinkElementRev), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLLinkElementRev) } },
144 { "sizes", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLLinkElementSizes), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLLinkElementSizes) } },
145 { "target", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLLinkElementTarget), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLLinkElementTarget) } },
146 { "type", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLLinkElementType), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLLinkElementType) } },
147 { "as", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLLinkElementAs), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLLinkElementAs) } },
148 { "crossOrigin", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLLinkElementCrossOrigin), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLLinkElementCrossOrigin) } },
149 { "imageSrcset", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLLinkElementImageSrcset), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLLinkElementImageSrcset) } },
150 { "imageSizes", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLLinkElementImageSizes), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLLinkElementImageSizes) } },
151 { "sheet", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLLinkElementSheet), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
152 { "relList", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLLinkElementRelList), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLLinkElementRelList) } },
153 { "nonce", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLLinkElementNonce), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLLinkElementNonce) } },
154 { "integrity", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLLinkElementIntegrity), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLLinkElementIntegrity) } },
155};
156
157const ClassInfo JSHTMLLinkElementPrototype::s_info = { "HTMLLinkElementPrototype", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSHTMLLinkElementPrototype) };
158
159void JSHTMLLinkElementPrototype::finishCreation(VM& vm)
160{
161 Base::finishCreation(vm);
162 reifyStaticProperties(vm, JSHTMLLinkElement::info(), JSHTMLLinkElementPrototypeTableValues, *this);
163 bool hasDisabledRuntimeProperties = false;
164 if (!downcast<Document>(jsCast<JSDOMGlobalObject*>(globalObject())->scriptExecutionContext())->settings().subresourceIntegrityEnabled()) {
165 hasDisabledRuntimeProperties = true;
166 auto propertyName = Identifier::fromString(&vm, reinterpret_cast<const LChar*>("integrity"), strlen("integrity"));
167 VM::DeletePropertyModeScope scope(vm, VM::DeletePropertyMode::IgnoreConfigurable);
168 JSObject::deleteProperty(this, globalObject()->globalExec(), propertyName);
169 }
170 if (hasDisabledRuntimeProperties && structure()->isDictionary())
171 flattenDictionaryObject(vm);
172}
173
174const ClassInfo JSHTMLLinkElement::s_info = { "HTMLLinkElement", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSHTMLLinkElement) };
175
176JSHTMLLinkElement::JSHTMLLinkElement(Structure* structure, JSDOMGlobalObject& globalObject, Ref<HTMLLinkElement>&& impl)
177 : JSHTMLElement(structure, globalObject, WTFMove(impl))
178{
179}
180
181void JSHTMLLinkElement::finishCreation(VM& vm)
182{
183 Base::finishCreation(vm);
184 ASSERT(inherits(vm, info()));
185
186}
187
188JSObject* JSHTMLLinkElement::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
189{
190 return JSHTMLLinkElementPrototype::create(vm, &globalObject, JSHTMLLinkElementPrototype::createStructure(vm, &globalObject, JSHTMLElement::prototype(vm, globalObject)));
191}
192
193JSObject* JSHTMLLinkElement::prototype(VM& vm, JSDOMGlobalObject& globalObject)
194{
195 return getDOMPrototype<JSHTMLLinkElement>(vm, globalObject);
196}
197
198JSValue JSHTMLLinkElement::getConstructor(VM& vm, const JSGlobalObject* globalObject)
199{
200 return getDOMConstructor<JSHTMLLinkElementConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject));
201}
202
203template<> inline JSHTMLLinkElement* IDLAttribute<JSHTMLLinkElement>::cast(ExecState& state, EncodedJSValue thisValue)
204{
205 return jsDynamicCast<JSHTMLLinkElement*>(state.vm(), JSValue::decode(thisValue));
206}
207
208EncodedJSValue jsHTMLLinkElementConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
209{
210 VM& vm = state->vm();
211 auto throwScope = DECLARE_THROW_SCOPE(vm);
212 auto* prototype = jsDynamicCast<JSHTMLLinkElementPrototype*>(vm, JSValue::decode(thisValue));
213 if (UNLIKELY(!prototype))
214 return throwVMTypeError(state, throwScope);
215 return JSValue::encode(JSHTMLLinkElement::getConstructor(state->vm(), prototype->globalObject()));
216}
217
218bool setJSHTMLLinkElementConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
219{
220 VM& vm = state->vm();
221 auto throwScope = DECLARE_THROW_SCOPE(vm);
222 auto* prototype = jsDynamicCast<JSHTMLLinkElementPrototype*>(vm, JSValue::decode(thisValue));
223 if (UNLIKELY(!prototype)) {
224 throwVMTypeError(state, throwScope);
225 return false;
226 }
227 // Shadowing a built-in constructor
228 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));
229}
230
231static inline JSValue jsHTMLLinkElementDisabledGetter(ExecState& state, JSHTMLLinkElement& thisObject, ThrowScope& throwScope)
232{
233 UNUSED_PARAM(throwScope);
234 UNUSED_PARAM(state);
235 auto& impl = thisObject.wrapped();
236 JSValue result = toJS<IDLBoolean>(state, throwScope, impl.hasAttributeWithoutSynchronization(WebCore::HTMLNames::disabledAttr));
237 return result;
238}
239
240EncodedJSValue jsHTMLLinkElementDisabled(ExecState* state, EncodedJSValue thisValue, PropertyName)
241{
242 return IDLAttribute<JSHTMLLinkElement>::get<jsHTMLLinkElementDisabledGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "disabled");
243}
244
245static inline bool setJSHTMLLinkElementDisabledSetter(ExecState& state, JSHTMLLinkElement& thisObject, JSValue value, ThrowScope& throwScope)
246{
247 UNUSED_PARAM(throwScope);
248 auto& impl = thisObject.wrapped();
249 auto nativeValue = convert<IDLBoolean>(state, value);
250 RETURN_IF_EXCEPTION(throwScope, false);
251 AttributeSetter::call(state, throwScope, [&] {
252 return impl.setBooleanAttribute(WebCore::HTMLNames::disabledAttr, WTFMove(nativeValue));
253 });
254 return true;
255}
256
257bool setJSHTMLLinkElementDisabled(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
258{
259 return IDLAttribute<JSHTMLLinkElement>::set<setJSHTMLLinkElementDisabledSetter>(*state, thisValue, encodedValue, "disabled");
260}
261
262static inline JSValue jsHTMLLinkElementCharsetGetter(ExecState& state, JSHTMLLinkElement& thisObject, ThrowScope& throwScope)
263{
264 UNUSED_PARAM(throwScope);
265 UNUSED_PARAM(state);
266 auto& impl = thisObject.wrapped();
267 JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::charsetAttr));
268 return result;
269}
270
271EncodedJSValue jsHTMLLinkElementCharset(ExecState* state, EncodedJSValue thisValue, PropertyName)
272{
273 return IDLAttribute<JSHTMLLinkElement>::get<jsHTMLLinkElementCharsetGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "charset");
274}
275
276static inline bool setJSHTMLLinkElementCharsetSetter(ExecState& state, JSHTMLLinkElement& thisObject, JSValue value, ThrowScope& throwScope)
277{
278 UNUSED_PARAM(throwScope);
279 CustomElementReactionDisallowedScope customElementReactionDisallowedScope;
280 auto& impl = thisObject.wrapped();
281 auto nativeValue = convert<IDLDOMString>(state, value);
282 RETURN_IF_EXCEPTION(throwScope, false);
283 AttributeSetter::call(state, throwScope, [&] {
284 return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::charsetAttr, WTFMove(nativeValue));
285 });
286 return true;
287}
288
289bool setJSHTMLLinkElementCharset(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
290{
291 return IDLAttribute<JSHTMLLinkElement>::set<setJSHTMLLinkElementCharsetSetter>(*state, thisValue, encodedValue, "charset");
292}
293
294static inline JSValue jsHTMLLinkElementHrefGetter(ExecState& state, JSHTMLLinkElement& thisObject, ThrowScope& throwScope)
295{
296 UNUSED_PARAM(throwScope);
297 UNUSED_PARAM(state);
298 auto& impl = thisObject.wrapped();
299 JSValue result = toJS<IDLUSVString>(state, throwScope, impl.getURLAttribute(WebCore::HTMLNames::hrefAttr));
300 return result;
301}
302
303EncodedJSValue jsHTMLLinkElementHref(ExecState* state, EncodedJSValue thisValue, PropertyName)
304{
305 return IDLAttribute<JSHTMLLinkElement>::get<jsHTMLLinkElementHrefGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "href");
306}
307
308static inline bool setJSHTMLLinkElementHrefSetter(ExecState& state, JSHTMLLinkElement& thisObject, JSValue value, ThrowScope& throwScope)
309{
310 UNUSED_PARAM(throwScope);
311 CustomElementReactionDisallowedScope customElementReactionDisallowedScope;
312 auto& impl = thisObject.wrapped();
313 auto nativeValue = convert<IDLUSVString>(state, value);
314 RETURN_IF_EXCEPTION(throwScope, false);
315 AttributeSetter::call(state, throwScope, [&] {
316 return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::hrefAttr, WTFMove(nativeValue));
317 });
318 return true;
319}
320
321bool setJSHTMLLinkElementHref(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
322{
323 return IDLAttribute<JSHTMLLinkElement>::set<setJSHTMLLinkElementHrefSetter>(*state, thisValue, encodedValue, "href");
324}
325
326static inline JSValue jsHTMLLinkElementHreflangGetter(ExecState& state, JSHTMLLinkElement& thisObject, ThrowScope& throwScope)
327{
328 UNUSED_PARAM(throwScope);
329 UNUSED_PARAM(state);
330 auto& impl = thisObject.wrapped();
331 JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::hreflangAttr));
332 return result;
333}
334
335EncodedJSValue jsHTMLLinkElementHreflang(ExecState* state, EncodedJSValue thisValue, PropertyName)
336{
337 return IDLAttribute<JSHTMLLinkElement>::get<jsHTMLLinkElementHreflangGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "hreflang");
338}
339
340static inline bool setJSHTMLLinkElementHreflangSetter(ExecState& state, JSHTMLLinkElement& thisObject, JSValue value, ThrowScope& throwScope)
341{
342 UNUSED_PARAM(throwScope);
343 CustomElementReactionDisallowedScope customElementReactionDisallowedScope;
344 auto& impl = thisObject.wrapped();
345 auto nativeValue = convert<IDLDOMString>(state, value);
346 RETURN_IF_EXCEPTION(throwScope, false);
347 AttributeSetter::call(state, throwScope, [&] {
348 return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::hreflangAttr, WTFMove(nativeValue));
349 });
350 return true;
351}
352
353bool setJSHTMLLinkElementHreflang(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
354{
355 return IDLAttribute<JSHTMLLinkElement>::set<setJSHTMLLinkElementHreflangSetter>(*state, thisValue, encodedValue, "hreflang");
356}
357
358static inline JSValue jsHTMLLinkElementMediaGetter(ExecState& state, JSHTMLLinkElement& thisObject, ThrowScope& throwScope)
359{
360 UNUSED_PARAM(throwScope);
361 UNUSED_PARAM(state);
362 auto& impl = thisObject.wrapped();
363 JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::mediaAttr));
364 return result;
365}
366
367EncodedJSValue jsHTMLLinkElementMedia(ExecState* state, EncodedJSValue thisValue, PropertyName)
368{
369 return IDLAttribute<JSHTMLLinkElement>::get<jsHTMLLinkElementMediaGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "media");
370}
371
372static inline bool setJSHTMLLinkElementMediaSetter(ExecState& state, JSHTMLLinkElement& thisObject, JSValue value, ThrowScope& throwScope)
373{
374 UNUSED_PARAM(throwScope);
375 CustomElementReactionDisallowedScope customElementReactionDisallowedScope;
376 auto& impl = thisObject.wrapped();
377 auto nativeValue = convert<IDLDOMString>(state, value);
378 RETURN_IF_EXCEPTION(throwScope, false);
379 AttributeSetter::call(state, throwScope, [&] {
380 return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::mediaAttr, WTFMove(nativeValue));
381 });
382 return true;
383}
384
385bool setJSHTMLLinkElementMedia(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
386{
387 return IDLAttribute<JSHTMLLinkElement>::set<setJSHTMLLinkElementMediaSetter>(*state, thisValue, encodedValue, "media");
388}
389
390static inline JSValue jsHTMLLinkElementRelGetter(ExecState& state, JSHTMLLinkElement& thisObject, ThrowScope& throwScope)
391{
392 UNUSED_PARAM(throwScope);
393 UNUSED_PARAM(state);
394 auto& impl = thisObject.wrapped();
395 JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::relAttr));
396 return result;
397}
398
399EncodedJSValue jsHTMLLinkElementRel(ExecState* state, EncodedJSValue thisValue, PropertyName)
400{
401 return IDLAttribute<JSHTMLLinkElement>::get<jsHTMLLinkElementRelGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "rel");
402}
403
404static inline bool setJSHTMLLinkElementRelSetter(ExecState& state, JSHTMLLinkElement& thisObject, JSValue value, ThrowScope& throwScope)
405{
406 UNUSED_PARAM(throwScope);
407 CustomElementReactionDisallowedScope customElementReactionDisallowedScope;
408 auto& impl = thisObject.wrapped();
409 auto nativeValue = convert<IDLDOMString>(state, value);
410 RETURN_IF_EXCEPTION(throwScope, false);
411 AttributeSetter::call(state, throwScope, [&] {
412 return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::relAttr, WTFMove(nativeValue));
413 });
414 return true;
415}
416
417bool setJSHTMLLinkElementRel(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
418{
419 return IDLAttribute<JSHTMLLinkElement>::set<setJSHTMLLinkElementRelSetter>(*state, thisValue, encodedValue, "rel");
420}
421
422static inline JSValue jsHTMLLinkElementRevGetter(ExecState& state, JSHTMLLinkElement& thisObject, ThrowScope& throwScope)
423{
424 UNUSED_PARAM(throwScope);
425 UNUSED_PARAM(state);
426 auto& impl = thisObject.wrapped();
427 JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::revAttr));
428 return result;
429}
430
431EncodedJSValue jsHTMLLinkElementRev(ExecState* state, EncodedJSValue thisValue, PropertyName)
432{
433 return IDLAttribute<JSHTMLLinkElement>::get<jsHTMLLinkElementRevGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "rev");
434}
435
436static inline bool setJSHTMLLinkElementRevSetter(ExecState& state, JSHTMLLinkElement& thisObject, JSValue value, ThrowScope& throwScope)
437{
438 UNUSED_PARAM(throwScope);
439 CustomElementReactionDisallowedScope customElementReactionDisallowedScope;
440 auto& impl = thisObject.wrapped();
441 auto nativeValue = convert<IDLDOMString>(state, value);
442 RETURN_IF_EXCEPTION(throwScope, false);
443 AttributeSetter::call(state, throwScope, [&] {
444 return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::revAttr, WTFMove(nativeValue));
445 });
446 return true;
447}
448
449bool setJSHTMLLinkElementRev(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
450{
451 return IDLAttribute<JSHTMLLinkElement>::set<setJSHTMLLinkElementRevSetter>(*state, thisValue, encodedValue, "rev");
452}
453
454static inline JSValue jsHTMLLinkElementSizesGetter(ExecState& state, JSHTMLLinkElement& thisObject, ThrowScope& throwScope)
455{
456 UNUSED_PARAM(throwScope);
457 UNUSED_PARAM(state);
458 auto& impl = thisObject.wrapped();
459 JSValue result = toJS<IDLInterface<DOMTokenList>>(state, *thisObject.globalObject(), throwScope, impl.sizes());
460 return result;
461}
462
463EncodedJSValue jsHTMLLinkElementSizes(ExecState* state, EncodedJSValue thisValue, PropertyName)
464{
465 return IDLAttribute<JSHTMLLinkElement>::get<jsHTMLLinkElementSizesGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "sizes");
466}
467
468static inline bool setJSHTMLLinkElementSizesSetter(ExecState& state, JSHTMLLinkElement& thisObject, JSValue value, ThrowScope& throwScope)
469{
470 UNUSED_PARAM(throwScope);
471 auto id = Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("sizes"), strlen("sizes"));
472 auto valueToForwardTo = thisObject.get(&state, id);
473 RETURN_IF_EXCEPTION(throwScope, false);
474 if (UNLIKELY(!valueToForwardTo.isObject())) {
475 throwTypeError(&state, throwScope);
476 return false;
477 }
478 auto forwardId = Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("value"), strlen("value"));
479 PutPropertySlot slot(valueToForwardTo, false);
480 asObject(valueToForwardTo)->methodTable(state.vm())->put(asObject(valueToForwardTo), &state, forwardId, value, slot);
481 RETURN_IF_EXCEPTION(throwScope, false);
482 return true;
483}
484
485bool setJSHTMLLinkElementSizes(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
486{
487 return IDLAttribute<JSHTMLLinkElement>::set<setJSHTMLLinkElementSizesSetter>(*state, thisValue, encodedValue, "sizes");
488}
489
490static inline JSValue jsHTMLLinkElementTargetGetter(ExecState& state, JSHTMLLinkElement& thisObject, ThrowScope& throwScope)
491{
492 UNUSED_PARAM(throwScope);
493 UNUSED_PARAM(state);
494 auto& impl = thisObject.wrapped();
495 JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::targetAttr));
496 return result;
497}
498
499EncodedJSValue jsHTMLLinkElementTarget(ExecState* state, EncodedJSValue thisValue, PropertyName)
500{
501 return IDLAttribute<JSHTMLLinkElement>::get<jsHTMLLinkElementTargetGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "target");
502}
503
504static inline bool setJSHTMLLinkElementTargetSetter(ExecState& state, JSHTMLLinkElement& thisObject, JSValue value, ThrowScope& throwScope)
505{
506 UNUSED_PARAM(throwScope);
507 CustomElementReactionDisallowedScope customElementReactionDisallowedScope;
508 auto& impl = thisObject.wrapped();
509 auto nativeValue = convert<IDLDOMString>(state, value);
510 RETURN_IF_EXCEPTION(throwScope, false);
511 AttributeSetter::call(state, throwScope, [&] {
512 return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::targetAttr, WTFMove(nativeValue));
513 });
514 return true;
515}
516
517bool setJSHTMLLinkElementTarget(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
518{
519 return IDLAttribute<JSHTMLLinkElement>::set<setJSHTMLLinkElementTargetSetter>(*state, thisValue, encodedValue, "target");
520}
521
522static inline JSValue jsHTMLLinkElementTypeGetter(ExecState& state, JSHTMLLinkElement& thisObject, ThrowScope& throwScope)
523{
524 UNUSED_PARAM(throwScope);
525 UNUSED_PARAM(state);
526 auto& impl = thisObject.wrapped();
527 JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::typeAttr));
528 return result;
529}
530
531EncodedJSValue jsHTMLLinkElementType(ExecState* state, EncodedJSValue thisValue, PropertyName)
532{
533 return IDLAttribute<JSHTMLLinkElement>::get<jsHTMLLinkElementTypeGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "type");
534}
535
536static inline bool setJSHTMLLinkElementTypeSetter(ExecState& state, JSHTMLLinkElement& thisObject, JSValue value, ThrowScope& throwScope)
537{
538 UNUSED_PARAM(throwScope);
539 CustomElementReactionDisallowedScope customElementReactionDisallowedScope;
540 auto& impl = thisObject.wrapped();
541 auto nativeValue = convert<IDLDOMString>(state, value);
542 RETURN_IF_EXCEPTION(throwScope, false);
543 AttributeSetter::call(state, throwScope, [&] {
544 return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::typeAttr, WTFMove(nativeValue));
545 });
546 return true;
547}
548
549bool setJSHTMLLinkElementType(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
550{
551 return IDLAttribute<JSHTMLLinkElement>::set<setJSHTMLLinkElementTypeSetter>(*state, thisValue, encodedValue, "type");
552}
553
554static inline JSValue jsHTMLLinkElementAsGetter(ExecState& state, JSHTMLLinkElement& thisObject, ThrowScope& throwScope)
555{
556 UNUSED_PARAM(throwScope);
557 UNUSED_PARAM(state);
558 auto& impl = thisObject.wrapped();
559 JSValue result = toJS<IDLDOMString>(state, throwScope, impl.as());
560 return result;
561}
562
563EncodedJSValue jsHTMLLinkElementAs(ExecState* state, EncodedJSValue thisValue, PropertyName)
564{
565 return IDLAttribute<JSHTMLLinkElement>::get<jsHTMLLinkElementAsGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "as");
566}
567
568static inline bool setJSHTMLLinkElementAsSetter(ExecState& state, JSHTMLLinkElement& thisObject, JSValue value, ThrowScope& throwScope)
569{
570 UNUSED_PARAM(throwScope);
571 CustomElementReactionDisallowedScope customElementReactionDisallowedScope;
572 auto& impl = thisObject.wrapped();
573 auto nativeValue = convert<IDLDOMString>(state, value);
574 RETURN_IF_EXCEPTION(throwScope, false);
575 AttributeSetter::call(state, throwScope, [&] {
576 return impl.setAs(WTFMove(nativeValue));
577 });
578 return true;
579}
580
581bool setJSHTMLLinkElementAs(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
582{
583 return IDLAttribute<JSHTMLLinkElement>::set<setJSHTMLLinkElementAsSetter>(*state, thisValue, encodedValue, "as");
584}
585
586static inline JSValue jsHTMLLinkElementCrossOriginGetter(ExecState& state, JSHTMLLinkElement& thisObject, ThrowScope& throwScope)
587{
588 UNUSED_PARAM(throwScope);
589 UNUSED_PARAM(state);
590 auto& impl = thisObject.wrapped();
591 JSValue result = toJS<IDLNullable<IDLDOMString>>(state, throwScope, impl.crossOrigin());
592 return result;
593}
594
595EncodedJSValue jsHTMLLinkElementCrossOrigin(ExecState* state, EncodedJSValue thisValue, PropertyName)
596{
597 return IDLAttribute<JSHTMLLinkElement>::get<jsHTMLLinkElementCrossOriginGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "crossOrigin");
598}
599
600static inline bool setJSHTMLLinkElementCrossOriginSetter(ExecState& state, JSHTMLLinkElement& thisObject, JSValue value, ThrowScope& throwScope)
601{
602 UNUSED_PARAM(throwScope);
603 CustomElementReactionDisallowedScope customElementReactionDisallowedScope;
604 auto& impl = thisObject.wrapped();
605 auto nativeValue = convert<IDLNullable<IDLDOMString>>(state, value);
606 RETURN_IF_EXCEPTION(throwScope, false);
607 AttributeSetter::call(state, throwScope, [&] {
608 return impl.setCrossOrigin(WTFMove(nativeValue));
609 });
610 return true;
611}
612
613bool setJSHTMLLinkElementCrossOrigin(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
614{
615 return IDLAttribute<JSHTMLLinkElement>::set<setJSHTMLLinkElementCrossOriginSetter>(*state, thisValue, encodedValue, "crossOrigin");
616}
617
618static inline JSValue jsHTMLLinkElementImageSrcsetGetter(ExecState& state, JSHTMLLinkElement& thisObject, ThrowScope& throwScope)
619{
620 UNUSED_PARAM(throwScope);
621 UNUSED_PARAM(state);
622 auto& impl = thisObject.wrapped();
623 JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::imagesrcsetAttr));
624 return result;
625}
626
627EncodedJSValue jsHTMLLinkElementImageSrcset(ExecState* state, EncodedJSValue thisValue, PropertyName)
628{
629 return IDLAttribute<JSHTMLLinkElement>::get<jsHTMLLinkElementImageSrcsetGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "imageSrcset");
630}
631
632static inline bool setJSHTMLLinkElementImageSrcsetSetter(ExecState& state, JSHTMLLinkElement& thisObject, JSValue value, ThrowScope& throwScope)
633{
634 UNUSED_PARAM(throwScope);
635 CustomElementReactionDisallowedScope customElementReactionDisallowedScope;
636 auto& impl = thisObject.wrapped();
637 auto nativeValue = convert<IDLDOMString>(state, value);
638 RETURN_IF_EXCEPTION(throwScope, false);
639 AttributeSetter::call(state, throwScope, [&] {
640 return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::imagesrcsetAttr, WTFMove(nativeValue));
641 });
642 return true;
643}
644
645bool setJSHTMLLinkElementImageSrcset(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
646{
647 return IDLAttribute<JSHTMLLinkElement>::set<setJSHTMLLinkElementImageSrcsetSetter>(*state, thisValue, encodedValue, "imageSrcset");
648}
649
650static inline JSValue jsHTMLLinkElementImageSizesGetter(ExecState& state, JSHTMLLinkElement& thisObject, ThrowScope& throwScope)
651{
652 UNUSED_PARAM(throwScope);
653 UNUSED_PARAM(state);
654 auto& impl = thisObject.wrapped();
655 JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::imagesizesAttr));
656 return result;
657}
658
659EncodedJSValue jsHTMLLinkElementImageSizes(ExecState* state, EncodedJSValue thisValue, PropertyName)
660{
661 return IDLAttribute<JSHTMLLinkElement>::get<jsHTMLLinkElementImageSizesGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "imageSizes");
662}
663
664static inline bool setJSHTMLLinkElementImageSizesSetter(ExecState& state, JSHTMLLinkElement& thisObject, JSValue value, ThrowScope& throwScope)
665{
666 UNUSED_PARAM(throwScope);
667 CustomElementReactionDisallowedScope customElementReactionDisallowedScope;
668 auto& impl = thisObject.wrapped();
669 auto nativeValue = convert<IDLDOMString>(state, value);
670 RETURN_IF_EXCEPTION(throwScope, false);
671 AttributeSetter::call(state, throwScope, [&] {
672 return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::imagesizesAttr, WTFMove(nativeValue));
673 });
674 return true;
675}
676
677bool setJSHTMLLinkElementImageSizes(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
678{
679 return IDLAttribute<JSHTMLLinkElement>::set<setJSHTMLLinkElementImageSizesSetter>(*state, thisValue, encodedValue, "imageSizes");
680}
681
682static inline JSValue jsHTMLLinkElementSheetGetter(ExecState& state, JSHTMLLinkElement& thisObject, ThrowScope& throwScope)
683{
684 UNUSED_PARAM(throwScope);
685 UNUSED_PARAM(state);
686 auto& impl = thisObject.wrapped();
687 JSValue result = toJS<IDLInterface<StyleSheet>>(state, *thisObject.globalObject(), throwScope, impl.sheet());
688 return result;
689}
690
691EncodedJSValue jsHTMLLinkElementSheet(ExecState* state, EncodedJSValue thisValue, PropertyName)
692{
693 return IDLAttribute<JSHTMLLinkElement>::get<jsHTMLLinkElementSheetGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "sheet");
694}
695
696static inline JSValue jsHTMLLinkElementRelListGetter(ExecState& state, JSHTMLLinkElement& thisObject, ThrowScope& throwScope)
697{
698 UNUSED_PARAM(throwScope);
699 UNUSED_PARAM(state);
700 auto& impl = thisObject.wrapped();
701 JSValue result = toJS<IDLInterface<DOMTokenList>>(state, *thisObject.globalObject(), throwScope, impl.relList());
702 return result;
703}
704
705EncodedJSValue jsHTMLLinkElementRelList(ExecState* state, EncodedJSValue thisValue, PropertyName)
706{
707 return IDLAttribute<JSHTMLLinkElement>::get<jsHTMLLinkElementRelListGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "relList");
708}
709
710static inline bool setJSHTMLLinkElementRelListSetter(ExecState& state, JSHTMLLinkElement& thisObject, JSValue value, ThrowScope& throwScope)
711{
712 UNUSED_PARAM(throwScope);
713 auto id = Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("relList"), strlen("relList"));
714 auto valueToForwardTo = thisObject.get(&state, id);
715 RETURN_IF_EXCEPTION(throwScope, false);
716 if (UNLIKELY(!valueToForwardTo.isObject())) {
717 throwTypeError(&state, throwScope);
718 return false;
719 }
720 auto forwardId = Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("value"), strlen("value"));
721 PutPropertySlot slot(valueToForwardTo, false);
722 asObject(valueToForwardTo)->methodTable(state.vm())->put(asObject(valueToForwardTo), &state, forwardId, value, slot);
723 RETURN_IF_EXCEPTION(throwScope, false);
724 return true;
725}
726
727bool setJSHTMLLinkElementRelList(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
728{
729 return IDLAttribute<JSHTMLLinkElement>::set<setJSHTMLLinkElementRelListSetter>(*state, thisValue, encodedValue, "relList");
730}
731
732static inline JSValue jsHTMLLinkElementNonceGetter(ExecState& state, JSHTMLLinkElement& thisObject, ThrowScope& throwScope)
733{
734 UNUSED_PARAM(throwScope);
735 UNUSED_PARAM(state);
736 auto& impl = thisObject.wrapped();
737 JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::nonceAttr));
738 return result;
739}
740
741EncodedJSValue jsHTMLLinkElementNonce(ExecState* state, EncodedJSValue thisValue, PropertyName)
742{
743 return IDLAttribute<JSHTMLLinkElement>::get<jsHTMLLinkElementNonceGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "nonce");
744}
745
746static inline bool setJSHTMLLinkElementNonceSetter(ExecState& state, JSHTMLLinkElement& thisObject, JSValue value, ThrowScope& throwScope)
747{
748 UNUSED_PARAM(throwScope);
749 auto& impl = thisObject.wrapped();
750 auto nativeValue = convert<IDLDOMString>(state, value);
751 RETURN_IF_EXCEPTION(throwScope, false);
752 AttributeSetter::call(state, throwScope, [&] {
753 return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::nonceAttr, WTFMove(nativeValue));
754 });
755 return true;
756}
757
758bool setJSHTMLLinkElementNonce(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
759{
760 return IDLAttribute<JSHTMLLinkElement>::set<setJSHTMLLinkElementNonceSetter>(*state, thisValue, encodedValue, "nonce");
761}
762
763static inline JSValue jsHTMLLinkElementIntegrityGetter(ExecState& state, JSHTMLLinkElement& thisObject, ThrowScope& throwScope)
764{
765 UNUSED_PARAM(throwScope);
766 UNUSED_PARAM(state);
767 auto& impl = thisObject.wrapped();
768 JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::integrityAttr));
769 return result;
770}
771
772EncodedJSValue jsHTMLLinkElementIntegrity(ExecState* state, EncodedJSValue thisValue, PropertyName)
773{
774 return IDLAttribute<JSHTMLLinkElement>::get<jsHTMLLinkElementIntegrityGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "integrity");
775}
776
777static inline bool setJSHTMLLinkElementIntegritySetter(ExecState& state, JSHTMLLinkElement& thisObject, JSValue value, ThrowScope& throwScope)
778{
779 UNUSED_PARAM(throwScope);
780 CustomElementReactionDisallowedScope customElementReactionDisallowedScope;
781 auto& impl = thisObject.wrapped();
782 auto nativeValue = convert<IDLDOMString>(state, value);
783 RETURN_IF_EXCEPTION(throwScope, false);
784 AttributeSetter::call(state, throwScope, [&] {
785 return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::integrityAttr, WTFMove(nativeValue));
786 });
787 return true;
788}
789
790bool setJSHTMLLinkElementIntegrity(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
791{
792 return IDLAttribute<JSHTMLLinkElement>::set<setJSHTMLLinkElementIntegritySetter>(*state, thisValue, encodedValue, "integrity");
793}
794
795void JSHTMLLinkElement::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& builder)
796{
797 auto* thisObject = jsCast<JSHTMLLinkElement*>(cell);
798 builder.setWrappedObjectForCell(cell, &thisObject->wrapped());
799 if (thisObject->scriptExecutionContext())
800 builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string());
801 Base::heapSnapshot(cell, builder);
802}
803
804HTMLLinkElement* JSHTMLLinkElement::toWrapped(JSC::VM& vm, JSC::JSValue value)
805{
806 if (auto* wrapper = jsDynamicCast<JSHTMLLinkElement*>(vm, value))
807 return &wrapper->wrapped();
808 return nullptr;
809}
810
811}
812