2 This file is part of the WebKit open source project.
3 This file has been generated by generate-bindings.pl. DO NOT MODIFY!
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.
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.
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.
22 #include "JSHTMLScriptElement.h"
24 #include "HTMLNames.h"
25 #include "HTMLScriptElement.h"
27 #include <runtime/JSString.h>
28 #include <wtf/GetPtr.h>
34 ASSERT_CLASS_FITS_IN_CELL(JSHTMLScriptElement);
38 #define THUNK_GENERATOR(generator) , generator
40 #define THUNK_GENERATOR(generator)
43 #define INTRINSIC(intrinsic) , intrinsic
45 #define INTRINSIC(intrinsic)
48 static const HashTableValue JSHTMLScriptElementTableValues[] =
50 { "text", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLScriptElementText), (intptr_t)setJSHTMLScriptElementText THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
51 { "htmlFor", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLScriptElementHtmlFor), (intptr_t)setJSHTMLScriptElementHtmlFor THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
52 { "event", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLScriptElementEvent), (intptr_t)setJSHTMLScriptElementEvent THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
53 { "charset", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLScriptElementCharset), (intptr_t)setJSHTMLScriptElementCharset THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
54 { "async", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLScriptElementAsync), (intptr_t)setJSHTMLScriptElementAsync THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
55 { "defer", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLScriptElementDefer), (intptr_t)setJSHTMLScriptElementDefer THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
56 { "src", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLScriptElementSrc), (intptr_t)setJSHTMLScriptElementSrc THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
57 { "type", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLScriptElementType), (intptr_t)setJSHTMLScriptElementType THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
58 { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLScriptElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
59 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
62 #undef THUNK_GENERATOR
63 static const HashTable JSHTMLScriptElementTable = { 32, 31, JSHTMLScriptElementTableValues, 0 };
64 /* Hash table for constructor */
66 #define THUNK_GENERATOR(generator) , generator
68 #define THUNK_GENERATOR(generator)
71 #define INTRINSIC(intrinsic) , intrinsic
73 #define INTRINSIC(intrinsic)
76 static const HashTableValue JSHTMLScriptElementConstructorTableValues[] =
78 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
81 #undef THUNK_GENERATOR
82 static const HashTable JSHTMLScriptElementConstructorTable = { 1, 0, JSHTMLScriptElementConstructorTableValues, 0 };
83 const ClassInfo JSHTMLScriptElementConstructor::s_info = { "HTMLScriptElementConstructor", &DOMConstructorObject::s_info, &JSHTMLScriptElementConstructorTable, 0, CREATE_METHOD_TABLE(JSHTMLScriptElementConstructor) };
85 JSHTMLScriptElementConstructor::JSHTMLScriptElementConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
86 : DOMConstructorObject(structure, globalObject)
90 void JSHTMLScriptElementConstructor::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject)
92 Base::finishCreation(exec->globalData());
93 ASSERT(inherits(&s_info));
94 putDirect(exec->globalData(), exec->propertyNames().prototype, JSHTMLScriptElementPrototype::self(exec, globalObject), DontDelete | ReadOnly);
97 bool JSHTMLScriptElementConstructor::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
99 return getStaticValueSlot<JSHTMLScriptElementConstructor, JSDOMWrapper>(exec, &JSHTMLScriptElementConstructorTable, static_cast<JSHTMLScriptElementConstructor*>(cell), propertyName, slot);
102 bool JSHTMLScriptElementConstructor::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
104 return getStaticValueDescriptor<JSHTMLScriptElementConstructor, JSDOMWrapper>(exec, &JSHTMLScriptElementConstructorTable, static_cast<JSHTMLScriptElementConstructor*>(object), propertyName, descriptor);
107 /* Hash table for prototype */
109 #define THUNK_GENERATOR(generator) , generator
111 #define THUNK_GENERATOR(generator)
114 #define INTRINSIC(intrinsic) , intrinsic
116 #define INTRINSIC(intrinsic)
119 static const HashTableValue JSHTMLScriptElementPrototypeTableValues[] =
121 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
124 #undef THUNK_GENERATOR
125 static const HashTable JSHTMLScriptElementPrototypeTable = { 1, 0, JSHTMLScriptElementPrototypeTableValues, 0 };
126 const ClassInfo JSHTMLScriptElementPrototype::s_info = { "HTMLScriptElementPrototype", &JSC::JSNonFinalObject::s_info, &JSHTMLScriptElementPrototypeTable, 0, CREATE_METHOD_TABLE(JSHTMLScriptElementPrototype) };
128 JSObject* JSHTMLScriptElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
130 return getDOMPrototype<JSHTMLScriptElement>(exec, globalObject);
133 const ClassInfo JSHTMLScriptElement::s_info = { "HTMLScriptElement", &JSHTMLElement::s_info, &JSHTMLScriptElementTable, 0 , CREATE_METHOD_TABLE(JSHTMLScriptElement) };
135 JSHTMLScriptElement::JSHTMLScriptElement(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLScriptElement> impl)
136 : JSHTMLElement(structure, globalObject, impl)
140 void JSHTMLScriptElement::finishCreation(JSGlobalData& globalData)
142 Base::finishCreation(globalData);
143 ASSERT(inherits(&s_info));
146 JSObject* JSHTMLScriptElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
148 return JSHTMLScriptElementPrototype::create(exec->globalData(), globalObject, JSHTMLScriptElementPrototype::createStructure(exec->globalData(), globalObject, JSHTMLElementPrototype::self(exec, globalObject)));
151 bool JSHTMLScriptElement::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
153 JSHTMLScriptElement* thisObject = jsCast<JSHTMLScriptElement*>(cell);
154 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
155 return getStaticValueSlot<JSHTMLScriptElement, Base>(exec, &JSHTMLScriptElementTable, thisObject, propertyName, slot);
158 bool JSHTMLScriptElement::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
160 JSHTMLScriptElement* thisObject = jsCast<JSHTMLScriptElement*>(object);
161 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
162 return getStaticValueDescriptor<JSHTMLScriptElement, Base>(exec, &JSHTMLScriptElementTable, thisObject, propertyName, descriptor);
165 JSValue jsHTMLScriptElementText(ExecState* exec, JSValue slotBase, const Identifier&)
167 JSHTMLScriptElement* castedThis = static_cast<JSHTMLScriptElement*>(asObject(slotBase));
169 HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(castedThis->impl());
170 JSValue result = jsString(exec, imp->text());
175 JSValue jsHTMLScriptElementHtmlFor(ExecState* exec, JSValue slotBase, const Identifier&)
177 JSHTMLScriptElement* castedThis = static_cast<JSHTMLScriptElement*>(asObject(slotBase));
179 HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(castedThis->impl());
180 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::forAttr));
185 JSValue jsHTMLScriptElementEvent(ExecState* exec, JSValue slotBase, const Identifier&)
187 JSHTMLScriptElement* castedThis = static_cast<JSHTMLScriptElement*>(asObject(slotBase));
189 HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(castedThis->impl());
190 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::eventAttr));
195 JSValue jsHTMLScriptElementCharset(ExecState* exec, JSValue slotBase, const Identifier&)
197 JSHTMLScriptElement* castedThis = static_cast<JSHTMLScriptElement*>(asObject(slotBase));
199 HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(castedThis->impl());
200 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::charsetAttr));
205 JSValue jsHTMLScriptElementAsync(ExecState* exec, JSValue slotBase, const Identifier&)
207 JSHTMLScriptElement* castedThis = static_cast<JSHTMLScriptElement*>(asObject(slotBase));
209 HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(castedThis->impl());
210 JSValue result = jsBoolean(imp->async());
215 JSValue jsHTMLScriptElementDefer(ExecState* exec, JSValue slotBase, const Identifier&)
217 JSHTMLScriptElement* castedThis = static_cast<JSHTMLScriptElement*>(asObject(slotBase));
219 HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(castedThis->impl());
220 JSValue result = jsBoolean(imp->hasAttribute(WebCore::HTMLNames::deferAttr));
225 JSValue jsHTMLScriptElementSrc(ExecState* exec, JSValue slotBase, const Identifier&)
227 JSHTMLScriptElement* castedThis = static_cast<JSHTMLScriptElement*>(asObject(slotBase));
229 HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(castedThis->impl());
230 JSValue result = jsString(exec, imp->getURLAttribute(WebCore::HTMLNames::srcAttr));
235 JSValue jsHTMLScriptElementType(ExecState* exec, JSValue slotBase, const Identifier&)
237 JSHTMLScriptElement* castedThis = static_cast<JSHTMLScriptElement*>(asObject(slotBase));
239 HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(castedThis->impl());
240 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::typeAttr));
245 JSValue jsHTMLScriptElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
247 JSHTMLScriptElement* domObject = static_cast<JSHTMLScriptElement*>(asObject(slotBase));
248 return JSHTMLScriptElement::getConstructor(exec, domObject->globalObject());
251 void JSHTMLScriptElement::put(JSCell* cell, ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
253 JSHTMLScriptElement* thisObject = jsCast<JSHTMLScriptElement*>(cell);
254 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
255 lookupPut<JSHTMLScriptElement, Base>(exec, propertyName, value, &JSHTMLScriptElementTable, thisObject, slot);
258 void setJSHTMLScriptElementText(ExecState* exec, JSObject* thisObject, JSValue value)
260 JSHTMLScriptElement* castedThis = static_cast<JSHTMLScriptElement*>(thisObject);
261 HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(castedThis->impl());
262 imp->setText(valueToStringWithNullCheck(exec, value));
266 void setJSHTMLScriptElementHtmlFor(ExecState* exec, JSObject* thisObject, JSValue value)
268 JSHTMLScriptElement* castedThis = static_cast<JSHTMLScriptElement*>(thisObject);
269 HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(castedThis->impl());
270 imp->setAttribute(WebCore::HTMLNames::forAttr, valueToStringWithNullCheck(exec, value));
274 void setJSHTMLScriptElementEvent(ExecState* exec, JSObject* thisObject, JSValue value)
276 JSHTMLScriptElement* castedThis = static_cast<JSHTMLScriptElement*>(thisObject);
277 HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(castedThis->impl());
278 imp->setAttribute(WebCore::HTMLNames::eventAttr, valueToStringWithNullCheck(exec, value));
282 void setJSHTMLScriptElementCharset(ExecState* exec, JSObject* thisObject, JSValue value)
284 JSHTMLScriptElement* castedThis = static_cast<JSHTMLScriptElement*>(thisObject);
285 HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(castedThis->impl());
286 imp->setAttribute(WebCore::HTMLNames::charsetAttr, valueToStringWithNullCheck(exec, value));
290 void setJSHTMLScriptElementAsync(ExecState* exec, JSObject* thisObject, JSValue value)
292 JSHTMLScriptElement* castedThis = static_cast<JSHTMLScriptElement*>(thisObject);
293 HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(castedThis->impl());
294 imp->setAsync(value.toBoolean(exec));
298 void setJSHTMLScriptElementDefer(ExecState* exec, JSObject* thisObject, JSValue value)
300 JSHTMLScriptElement* castedThis = static_cast<JSHTMLScriptElement*>(thisObject);
301 HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(castedThis->impl());
302 imp->setBooleanAttribute(WebCore::HTMLNames::deferAttr, value.toBoolean(exec));
306 void setJSHTMLScriptElementSrc(ExecState* exec, JSObject* thisObject, JSValue value)
308 JSHTMLScriptElement* castedThis = static_cast<JSHTMLScriptElement*>(thisObject);
309 HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(castedThis->impl());
310 imp->setAttribute(WebCore::HTMLNames::srcAttr, valueToStringWithNullCheck(exec, value));
314 void setJSHTMLScriptElementType(ExecState* exec, JSObject* thisObject, JSValue value)
316 JSHTMLScriptElement* castedThis = static_cast<JSHTMLScriptElement*>(thisObject);
317 HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(castedThis->impl());
318 imp->setAttribute(WebCore::HTMLNames::typeAttr, valueToStringWithNullCheck(exec, value));
322 JSValue JSHTMLScriptElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
324 return getDOMConstructor<JSHTMLScriptElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));