blob: 3bb66fdebce269ec149d9e2715d04ec78eeaf83e [file] [log] [blame]
/*
This file is part of the WebKit open source project.
This file has been generated by generate-bindings.pl. DO NOT MODIFY!
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "config.h"
#include "JSHTMLAnchorElement.h"
#include "ExceptionCode.h"
#include "HTMLNames.h"
#include "JSDOMBinding.h"
#include "JSDOMConstructor.h"
#include "JSDOMTokenList.h"
#include "RuntimeEnabledFeatures.h"
#include "URL.h"
#include <runtime/Error.h>
#include <runtime/JSString.h>
#include <wtf/GetPtr.h>
using namespace JSC;
namespace WebCore {
// Functions
JSC::EncodedJSValue JSC_HOST_CALL jsHTMLAnchorElementPrototypeFunctionToString(JSC::ExecState*);
// Attributes
JSC::EncodedJSValue jsHTMLAnchorElementCharset(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSHTMLAnchorElementCharset(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsHTMLAnchorElementCoords(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSHTMLAnchorElementCoords(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
#if ENABLE(DOWNLOAD_ATTRIBUTE)
JSC::EncodedJSValue jsHTMLAnchorElementDownload(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSHTMLAnchorElementDownload(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
#endif
JSC::EncodedJSValue jsHTMLAnchorElementHreflang(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSHTMLAnchorElementHreflang(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsHTMLAnchorElementName(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSHTMLAnchorElementName(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsHTMLAnchorElementPing(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSHTMLAnchorElementPing(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsHTMLAnchorElementRel(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSHTMLAnchorElementRel(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsHTMLAnchorElementRev(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSHTMLAnchorElementRev(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsHTMLAnchorElementShape(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSHTMLAnchorElementShape(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsHTMLAnchorElementTarget(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSHTMLAnchorElementTarget(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsHTMLAnchorElementType(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSHTMLAnchorElementType(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsHTMLAnchorElementText(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSHTMLAnchorElementText(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsHTMLAnchorElementRelList(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSHTMLAnchorElementRelList(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsHTMLAnchorElementHref(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSHTMLAnchorElementHref(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsHTMLAnchorElementOrigin(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
JSC::EncodedJSValue jsHTMLAnchorElementProtocol(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSHTMLAnchorElementProtocol(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsHTMLAnchorElementUsername(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSHTMLAnchorElementUsername(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsHTMLAnchorElementPassword(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSHTMLAnchorElementPassword(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsHTMLAnchorElementHost(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSHTMLAnchorElementHost(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsHTMLAnchorElementHostname(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSHTMLAnchorElementHostname(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsHTMLAnchorElementPort(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSHTMLAnchorElementPort(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsHTMLAnchorElementPathname(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSHTMLAnchorElementPathname(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsHTMLAnchorElementSearch(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSHTMLAnchorElementSearch(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsHTMLAnchorElementHash(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSHTMLAnchorElementHash(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsHTMLAnchorElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSHTMLAnchorElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
class JSHTMLAnchorElementPrototype : public JSC::JSNonFinalObject {
public:
typedef JSC::JSNonFinalObject Base;
static JSHTMLAnchorElementPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
{
JSHTMLAnchorElementPrototype* ptr = new (NotNull, JSC::allocateCell<JSHTMLAnchorElementPrototype>(vm.heap)) JSHTMLAnchorElementPrototype(vm, globalObject, structure);
ptr->finishCreation(vm);
return ptr;
}
DECLARE_INFO;
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
{
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
}
private:
JSHTMLAnchorElementPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure)
: JSC::JSNonFinalObject(vm, structure)
{
}
void finishCreation(JSC::VM&);
};
typedef JSDOMConstructorNotConstructable<JSHTMLAnchorElement> JSHTMLAnchorElementConstructor;
template<> JSValue JSHTMLAnchorElementConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject)
{
return JSHTMLElement::getConstructor(vm, &globalObject);
}
template<> void JSHTMLAnchorElementConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
{
putDirect(vm, vm.propertyNames->prototype, JSHTMLAnchorElement::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);
putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("HTMLAnchorElement"))), ReadOnly | DontEnum);
putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
}
template<> const ClassInfo JSHTMLAnchorElementConstructor::s_info = { "HTMLAnchorElement", &Base::s_info, 0, CREATE_METHOD_TABLE(JSHTMLAnchorElementConstructor) };
/* Hash table for prototype */
static const HashTableValue JSHTMLAnchorElementPrototypeTableValues[] =
{
{ "constructor", DontEnum, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementConstructor) } },
{ "charset", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementCharset), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementCharset) } },
{ "coords", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementCoords), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementCoords) } },
#if ENABLE(DOWNLOAD_ATTRIBUTE)
{ "download", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementDownload), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementDownload) } },
#else
{ 0, 0, NoIntrinsic, { 0, 0 } },
#endif
{ "hreflang", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementHreflang), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementHreflang) } },
{ "name", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementName), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementName) } },
{ "ping", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementPing), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementPing) } },
{ "rel", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementRel), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementRel) } },
{ "rev", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementRev), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementRev) } },
{ "shape", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementShape), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementShape) } },
{ "target", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementTarget), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementTarget) } },
{ "type", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementType), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementType) } },
{ "text", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementText), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementText) } },
{ "relList", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementRelList), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementRelList) } },
{ "href", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementHref), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementHref) } },
{ "origin", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementOrigin), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
{ "protocol", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementProtocol), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementProtocol) } },
{ "username", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementUsername), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementUsername) } },
{ "password", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementPassword), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementPassword) } },
{ "host", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementHost), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementHost) } },
{ "hostname", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementHostname), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementHostname) } },
{ "port", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementPort), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementPort) } },
{ "pathname", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementPathname), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementPathname) } },
{ "search", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementSearch), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementSearch) } },
{ "hash", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementHash), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAnchorElementHash) } },
{ "toString", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsHTMLAnchorElementPrototypeFunctionToString), (intptr_t) (0) } },
};
const ClassInfo JSHTMLAnchorElementPrototype::s_info = { "HTMLAnchorElementPrototype", &Base::s_info, 0, CREATE_METHOD_TABLE(JSHTMLAnchorElementPrototype) };
void JSHTMLAnchorElementPrototype::finishCreation(VM& vm)
{
Base::finishCreation(vm);
reifyStaticProperties(vm, JSHTMLAnchorElementPrototypeTableValues, *this);
#if ENABLE(DOWNLOAD_ATTRIBUTE)
if (!RuntimeEnabledFeatures::sharedFeatures().downloadAttributeEnabled()) {
Identifier propertyName = Identifier::fromString(&vm, reinterpret_cast<const LChar*>("download"), strlen("download"));
VM::DeletePropertyModeScope scope(vm, VM::DeletePropertyMode::IgnoreConfigurable);
JSObject::deleteProperty(this, globalObject()->globalExec(), propertyName);
}
#endif
}
const ClassInfo JSHTMLAnchorElement::s_info = { "HTMLAnchorElement", &Base::s_info, 0, CREATE_METHOD_TABLE(JSHTMLAnchorElement) };
JSHTMLAnchorElement::JSHTMLAnchorElement(Structure* structure, JSDOMGlobalObject& globalObject, Ref<HTMLAnchorElement>&& impl)
: JSHTMLElement(structure, globalObject, WTFMove(impl))
{
}
JSObject* JSHTMLAnchorElement::createPrototype(VM& vm, JSGlobalObject* globalObject)
{
return JSHTMLAnchorElementPrototype::create(vm, globalObject, JSHTMLAnchorElementPrototype::createStructure(vm, globalObject, JSHTMLElement::prototype(vm, globalObject)));
}
JSObject* JSHTMLAnchorElement::prototype(VM& vm, JSGlobalObject* globalObject)
{
return getDOMPrototype<JSHTMLAnchorElement>(vm, globalObject);
}
EncodedJSValue jsHTMLAnchorElementCharset(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
UNUSED_PARAM(thisValue);
JSValue decodedThisValue = JSValue::decode(thisValue);
auto* castedThis = jsDynamicCast<JSHTMLAnchorElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "HTMLAnchorElement", "charset");
}
auto& impl = castedThis->wrapped();
JSValue result = jsStringWithCache(state, impl.attributeWithoutSynchronization(WebCore::HTMLNames::charsetAttr));
return JSValue::encode(result);
}
EncodedJSValue jsHTMLAnchorElementCoords(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
UNUSED_PARAM(thisValue);
JSValue decodedThisValue = JSValue::decode(thisValue);
auto* castedThis = jsDynamicCast<JSHTMLAnchorElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "HTMLAnchorElement", "coords");
}
auto& impl = castedThis->wrapped();
JSValue result = jsStringWithCache(state, impl.attributeWithoutSynchronization(WebCore::HTMLNames::coordsAttr));
return JSValue::encode(result);
}
#if ENABLE(DOWNLOAD_ATTRIBUTE)
EncodedJSValue jsHTMLAnchorElementDownload(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
UNUSED_PARAM(thisValue);
JSValue decodedThisValue = JSValue::decode(thisValue);
auto* castedThis = jsDynamicCast<JSHTMLAnchorElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "HTMLAnchorElement", "download");
}
auto& impl = castedThis->wrapped();
JSValue result = jsStringWithCache(state, impl.attributeWithoutSynchronization(WebCore::HTMLNames::downloadAttr));
return JSValue::encode(result);
}
#endif
EncodedJSValue jsHTMLAnchorElementHreflang(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
UNUSED_PARAM(thisValue);
JSValue decodedThisValue = JSValue::decode(thisValue);
auto* castedThis = jsDynamicCast<JSHTMLAnchorElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "HTMLAnchorElement", "hreflang");
}
auto& impl = castedThis->wrapped();
JSValue result = jsStringWithCache(state, impl.attributeWithoutSynchronization(WebCore::HTMLNames::hreflangAttr));
return JSValue::encode(result);
}
EncodedJSValue jsHTMLAnchorElementName(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
UNUSED_PARAM(thisValue);
JSValue decodedThisValue = JSValue::decode(thisValue);
auto* castedThis = jsDynamicCast<JSHTMLAnchorElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "HTMLAnchorElement", "name");
}
auto& impl = castedThis->wrapped();
JSValue result = jsStringWithCache(state, impl.getNameAttribute());
return JSValue::encode(result);
}
EncodedJSValue jsHTMLAnchorElementPing(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
UNUSED_PARAM(thisValue);
JSValue decodedThisValue = JSValue::decode(thisValue);
auto* castedThis = jsDynamicCast<JSHTMLAnchorElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "HTMLAnchorElement", "ping");
}
auto& impl = castedThis->wrapped();
JSValue result = jsStringWithCache(state, impl.attributeWithoutSynchronization(WebCore::HTMLNames::pingAttr));
return JSValue::encode(result);
}
EncodedJSValue jsHTMLAnchorElementRel(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
UNUSED_PARAM(thisValue);
JSValue decodedThisValue = JSValue::decode(thisValue);
auto* castedThis = jsDynamicCast<JSHTMLAnchorElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "HTMLAnchorElement", "rel");
}
auto& impl = castedThis->wrapped();
JSValue result = jsStringWithCache(state, impl.attributeWithoutSynchronization(WebCore::HTMLNames::relAttr));
return JSValue::encode(result);
}
EncodedJSValue jsHTMLAnchorElementRev(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
UNUSED_PARAM(thisValue);
JSValue decodedThisValue = JSValue::decode(thisValue);
auto* castedThis = jsDynamicCast<JSHTMLAnchorElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "HTMLAnchorElement", "rev");
}
auto& impl = castedThis->wrapped();
JSValue result = jsStringWithCache(state, impl.attributeWithoutSynchronization(WebCore::HTMLNames::revAttr));
return JSValue::encode(result);
}
EncodedJSValue jsHTMLAnchorElementShape(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
UNUSED_PARAM(thisValue);
JSValue decodedThisValue = JSValue::decode(thisValue);
auto* castedThis = jsDynamicCast<JSHTMLAnchorElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "HTMLAnchorElement", "shape");
}
auto& impl = castedThis->wrapped();
JSValue result = jsStringWithCache(state, impl.attributeWithoutSynchronization(WebCore::HTMLNames::shapeAttr));
return JSValue::encode(result);
}
EncodedJSValue jsHTMLAnchorElementTarget(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
UNUSED_PARAM(thisValue);
JSValue decodedThisValue = JSValue::decode(thisValue);
auto* castedThis = jsDynamicCast<JSHTMLAnchorElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "HTMLAnchorElement", "target");
}
auto& impl = castedThis->wrapped();
JSValue result = jsStringWithCache(state, impl.attributeWithoutSynchronization(WebCore::HTMLNames::targetAttr));
return JSValue::encode(result);
}
EncodedJSValue jsHTMLAnchorElementType(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
UNUSED_PARAM(thisValue);
JSValue decodedThisValue = JSValue::decode(thisValue);
auto* castedThis = jsDynamicCast<JSHTMLAnchorElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "HTMLAnchorElement", "type");
}
auto& impl = castedThis->wrapped();
JSValue result = jsStringWithCache(state, impl.attributeWithoutSynchronization(WebCore::HTMLNames::typeAttr));
return JSValue::encode(result);
}
EncodedJSValue jsHTMLAnchorElementText(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
UNUSED_PARAM(thisValue);
JSValue decodedThisValue = JSValue::decode(thisValue);
auto* castedThis = jsDynamicCast<JSHTMLAnchorElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "HTMLAnchorElement", "text");
}
auto& impl = castedThis->wrapped();
JSValue result = jsStringWithCache(state, impl.text());
return JSValue::encode(result);
}
EncodedJSValue jsHTMLAnchorElementRelList(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
UNUSED_PARAM(thisValue);
JSValue decodedThisValue = JSValue::decode(thisValue);
auto* castedThis = jsDynamicCast<JSHTMLAnchorElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "HTMLAnchorElement", "relList");
}
auto& impl = castedThis->wrapped();
JSValue result = toJS(state, castedThis->globalObject(), impl.relList());
return JSValue::encode(result);
}
EncodedJSValue jsHTMLAnchorElementHref(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
UNUSED_PARAM(thisValue);
JSValue decodedThisValue = JSValue::decode(thisValue);
auto* castedThis = jsDynamicCast<JSHTMLAnchorElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "HTMLAnchorElement", "href");
}
auto& impl = castedThis->wrapped();
JSValue result = jsStringWithCache(state, impl.getURLAttribute(WebCore::HTMLNames::hrefAttr));
return JSValue::encode(result);
}
EncodedJSValue jsHTMLAnchorElementOrigin(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
UNUSED_PARAM(thisValue);
JSValue decodedThisValue = JSValue::decode(thisValue);
auto* castedThis = jsDynamicCast<JSHTMLAnchorElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "HTMLAnchorElement", "origin");
}
auto& impl = castedThis->wrapped();
JSValue result = jsStringWithCache(state, impl.origin());
return JSValue::encode(result);
}
EncodedJSValue jsHTMLAnchorElementProtocol(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
UNUSED_PARAM(thisValue);
JSValue decodedThisValue = JSValue::decode(thisValue);
auto* castedThis = jsDynamicCast<JSHTMLAnchorElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "HTMLAnchorElement", "protocol");
}
auto& impl = castedThis->wrapped();
JSValue result = jsStringWithCache(state, impl.protocol());
return JSValue::encode(result);
}
EncodedJSValue jsHTMLAnchorElementUsername(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
UNUSED_PARAM(thisValue);
JSValue decodedThisValue = JSValue::decode(thisValue);
auto* castedThis = jsDynamicCast<JSHTMLAnchorElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "HTMLAnchorElement", "username");
}
auto& impl = castedThis->wrapped();
JSValue result = jsStringWithCache(state, impl.username());
return JSValue::encode(result);
}
EncodedJSValue jsHTMLAnchorElementPassword(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
UNUSED_PARAM(thisValue);
JSValue decodedThisValue = JSValue::decode(thisValue);
auto* castedThis = jsDynamicCast<JSHTMLAnchorElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "HTMLAnchorElement", "password");
}
auto& impl = castedThis->wrapped();
JSValue result = jsStringWithCache(state, impl.password());
return JSValue::encode(result);
}
EncodedJSValue jsHTMLAnchorElementHost(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
UNUSED_PARAM(thisValue);
JSValue decodedThisValue = JSValue::decode(thisValue);
auto* castedThis = jsDynamicCast<JSHTMLAnchorElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "HTMLAnchorElement", "host");
}
auto& impl = castedThis->wrapped();
JSValue result = jsStringWithCache(state, impl.host());
return JSValue::encode(result);
}
EncodedJSValue jsHTMLAnchorElementHostname(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
UNUSED_PARAM(thisValue);
JSValue decodedThisValue = JSValue::decode(thisValue);
auto* castedThis = jsDynamicCast<JSHTMLAnchorElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "HTMLAnchorElement", "hostname");
}
auto& impl = castedThis->wrapped();
JSValue result = jsStringWithCache(state, impl.hostname());
return JSValue::encode(result);
}
EncodedJSValue jsHTMLAnchorElementPort(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
UNUSED_PARAM(thisValue);
JSValue decodedThisValue = JSValue::decode(thisValue);
auto* castedThis = jsDynamicCast<JSHTMLAnchorElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "HTMLAnchorElement", "port");
}
auto& impl = castedThis->wrapped();
JSValue result = jsStringWithCache(state, impl.port());
return JSValue::encode(result);
}
EncodedJSValue jsHTMLAnchorElementPathname(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
UNUSED_PARAM(thisValue);
JSValue decodedThisValue = JSValue::decode(thisValue);
auto* castedThis = jsDynamicCast<JSHTMLAnchorElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "HTMLAnchorElement", "pathname");
}
auto& impl = castedThis->wrapped();
JSValue result = jsStringWithCache(state, impl.pathname());
return JSValue::encode(result);
}
EncodedJSValue jsHTMLAnchorElementSearch(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
UNUSED_PARAM(thisValue);
JSValue decodedThisValue = JSValue::decode(thisValue);
auto* castedThis = jsDynamicCast<JSHTMLAnchorElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "HTMLAnchorElement", "search");
}
auto& impl = castedThis->wrapped();
JSValue result = jsStringWithCache(state, impl.search());
return JSValue::encode(result);
}
EncodedJSValue jsHTMLAnchorElementHash(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
UNUSED_PARAM(thisValue);
JSValue decodedThisValue = JSValue::decode(thisValue);
auto* castedThis = jsDynamicCast<JSHTMLAnchorElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "HTMLAnchorElement", "hash");
}
auto& impl = castedThis->wrapped();
JSValue result = jsStringWithCache(state, impl.hash());
return JSValue::encode(result);
}
EncodedJSValue jsHTMLAnchorElementConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
JSHTMLAnchorElementPrototype* domObject = jsDynamicCast<JSHTMLAnchorElementPrototype*>(JSValue::decode(thisValue));
if (UNLIKELY(!domObject))
return throwVMTypeError(state, throwScope);
return JSValue::encode(JSHTMLAnchorElement::getConstructor(state->vm(), domObject->globalObject()));
}
bool setJSHTMLAnchorElementConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
JSValue value = JSValue::decode(encodedValue);
JSHTMLAnchorElementPrototype* domObject = jsDynamicCast<JSHTMLAnchorElementPrototype*>(JSValue::decode(thisValue));
if (UNLIKELY(!domObject)) {
throwVMTypeError(state, throwScope);
return false;
}
// Shadowing a built-in constructor
return domObject->putDirect(state->vm(), state->propertyNames().constructor, value);
}
bool setJSHTMLAnchorElementCharset(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(thisValue);
JSHTMLAnchorElement* castedThis = jsDynamicCast<JSHTMLAnchorElement*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "HTMLAnchorElement", "charset");
}
auto& impl = castedThis->wrapped();
auto nativeValue = value.toWTFString(state);
RETURN_IF_EXCEPTION(throwScope, false);
impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::charsetAttr, WTFMove(nativeValue));
return true;
}
bool setJSHTMLAnchorElementCoords(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(thisValue);
JSHTMLAnchorElement* castedThis = jsDynamicCast<JSHTMLAnchorElement*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "HTMLAnchorElement", "coords");
}
auto& impl = castedThis->wrapped();
auto nativeValue = value.toWTFString(state);
RETURN_IF_EXCEPTION(throwScope, false);
impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::coordsAttr, WTFMove(nativeValue));
return true;
}
#if ENABLE(DOWNLOAD_ATTRIBUTE)
bool setJSHTMLAnchorElementDownload(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(thisValue);
JSHTMLAnchorElement* castedThis = jsDynamicCast<JSHTMLAnchorElement*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "HTMLAnchorElement", "download");
}
auto& impl = castedThis->wrapped();
auto nativeValue = value.toWTFString(state);
RETURN_IF_EXCEPTION(throwScope, false);
impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::downloadAttr, WTFMove(nativeValue));
return true;
}
#endif
bool setJSHTMLAnchorElementHreflang(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(thisValue);
JSHTMLAnchorElement* castedThis = jsDynamicCast<JSHTMLAnchorElement*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "HTMLAnchorElement", "hreflang");
}
auto& impl = castedThis->wrapped();
auto nativeValue = value.toWTFString(state);
RETURN_IF_EXCEPTION(throwScope, false);
impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::hreflangAttr, WTFMove(nativeValue));
return true;
}
bool setJSHTMLAnchorElementName(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(thisValue);
JSHTMLAnchorElement* castedThis = jsDynamicCast<JSHTMLAnchorElement*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "HTMLAnchorElement", "name");
}
auto& impl = castedThis->wrapped();
auto nativeValue = value.toWTFString(state);
RETURN_IF_EXCEPTION(throwScope, false);
impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::nameAttr, WTFMove(nativeValue));
return true;
}
bool setJSHTMLAnchorElementPing(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(thisValue);
JSHTMLAnchorElement* castedThis = jsDynamicCast<JSHTMLAnchorElement*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "HTMLAnchorElement", "ping");
}
auto& impl = castedThis->wrapped();
auto nativeValue = valueToUSVString(state, value);
RETURN_IF_EXCEPTION(throwScope, false);
impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::pingAttr, WTFMove(nativeValue));
return true;
}
bool setJSHTMLAnchorElementRel(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(thisValue);
JSHTMLAnchorElement* castedThis = jsDynamicCast<JSHTMLAnchorElement*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "HTMLAnchorElement", "rel");
}
auto& impl = castedThis->wrapped();
auto nativeValue = value.toWTFString(state);
RETURN_IF_EXCEPTION(throwScope, false);
impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::relAttr, WTFMove(nativeValue));
return true;
}
bool setJSHTMLAnchorElementRev(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(thisValue);
JSHTMLAnchorElement* castedThis = jsDynamicCast<JSHTMLAnchorElement*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "HTMLAnchorElement", "rev");
}
auto& impl = castedThis->wrapped();
auto nativeValue = value.toWTFString(state);
RETURN_IF_EXCEPTION(throwScope, false);
impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::revAttr, WTFMove(nativeValue));
return true;
}
bool setJSHTMLAnchorElementShape(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(thisValue);
JSHTMLAnchorElement* castedThis = jsDynamicCast<JSHTMLAnchorElement*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "HTMLAnchorElement", "shape");
}
auto& impl = castedThis->wrapped();
auto nativeValue = value.toWTFString(state);
RETURN_IF_EXCEPTION(throwScope, false);
impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::shapeAttr, WTFMove(nativeValue));
return true;
}
bool setJSHTMLAnchorElementTarget(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(thisValue);
JSHTMLAnchorElement* castedThis = jsDynamicCast<JSHTMLAnchorElement*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "HTMLAnchorElement", "target");
}
auto& impl = castedThis->wrapped();
auto nativeValue = value.toWTFString(state);
RETURN_IF_EXCEPTION(throwScope, false);
impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::targetAttr, WTFMove(nativeValue));
return true;
}
bool setJSHTMLAnchorElementType(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(thisValue);
JSHTMLAnchorElement* castedThis = jsDynamicCast<JSHTMLAnchorElement*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "HTMLAnchorElement", "type");
}
auto& impl = castedThis->wrapped();
auto nativeValue = value.toWTFString(state);
RETURN_IF_EXCEPTION(throwScope, false);
impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::typeAttr, WTFMove(nativeValue));
return true;
}
bool setJSHTMLAnchorElementText(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(thisValue);
JSHTMLAnchorElement* castedThis = jsDynamicCast<JSHTMLAnchorElement*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "HTMLAnchorElement", "text");
}
auto& impl = castedThis->wrapped();
auto nativeValue = value.toWTFString(state);
RETURN_IF_EXCEPTION(throwScope, false);
impl.setText(WTFMove(nativeValue));
return true;
}
bool setJSHTMLAnchorElementRelList(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(thisValue);
JSHTMLAnchorElement* castedThis = jsDynamicCast<JSHTMLAnchorElement*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "HTMLAnchorElement", "relList");
}
Ref<DOMTokenList> forwardedImpl = castedThis->wrapped().relList();
auto& impl = forwardedImpl.get();
auto nativeValue = value.toWTFString(state);
RETURN_IF_EXCEPTION(throwScope, false);
impl.setValue(WTFMove(nativeValue));
return true;
}
bool setJSHTMLAnchorElementHref(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(thisValue);
JSHTMLAnchorElement* castedThis = jsDynamicCast<JSHTMLAnchorElement*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "HTMLAnchorElement", "href");
}
auto& impl = castedThis->wrapped();
auto nativeValue = valueToUSVString(state, value);
RETURN_IF_EXCEPTION(throwScope, false);
impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::hrefAttr, WTFMove(nativeValue));
return true;
}
bool setJSHTMLAnchorElementProtocol(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(thisValue);
JSHTMLAnchorElement* castedThis = jsDynamicCast<JSHTMLAnchorElement*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "HTMLAnchorElement", "protocol");
}
auto& impl = castedThis->wrapped();
auto nativeValue = valueToUSVString(state, value);
RETURN_IF_EXCEPTION(throwScope, false);
impl.setProtocol(WTFMove(nativeValue));
return true;
}
bool setJSHTMLAnchorElementUsername(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(thisValue);
JSHTMLAnchorElement* castedThis = jsDynamicCast<JSHTMLAnchorElement*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "HTMLAnchorElement", "username");
}
auto& impl = castedThis->wrapped();
auto nativeValue = valueToUSVString(state, value);
RETURN_IF_EXCEPTION(throwScope, false);
impl.setUsername(WTFMove(nativeValue));
return true;
}
bool setJSHTMLAnchorElementPassword(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(thisValue);
JSHTMLAnchorElement* castedThis = jsDynamicCast<JSHTMLAnchorElement*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "HTMLAnchorElement", "password");
}
auto& impl = castedThis->wrapped();
auto nativeValue = valueToUSVString(state, value);
RETURN_IF_EXCEPTION(throwScope, false);
impl.setPassword(WTFMove(nativeValue));
return true;
}
bool setJSHTMLAnchorElementHost(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(thisValue);
JSHTMLAnchorElement* castedThis = jsDynamicCast<JSHTMLAnchorElement*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "HTMLAnchorElement", "host");
}
auto& impl = castedThis->wrapped();
auto nativeValue = valueToUSVString(state, value);
RETURN_IF_EXCEPTION(throwScope, false);
impl.setHost(WTFMove(nativeValue));
return true;
}
bool setJSHTMLAnchorElementHostname(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(thisValue);
JSHTMLAnchorElement* castedThis = jsDynamicCast<JSHTMLAnchorElement*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "HTMLAnchorElement", "hostname");
}
auto& impl = castedThis->wrapped();
auto nativeValue = valueToUSVString(state, value);
RETURN_IF_EXCEPTION(throwScope, false);
impl.setHostname(WTFMove(nativeValue));
return true;
}
bool setJSHTMLAnchorElementPort(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(thisValue);
JSHTMLAnchorElement* castedThis = jsDynamicCast<JSHTMLAnchorElement*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "HTMLAnchorElement", "port");
}
auto& impl = castedThis->wrapped();
auto nativeValue = valueToUSVString(state, value);
RETURN_IF_EXCEPTION(throwScope, false);
impl.setPort(WTFMove(nativeValue));
return true;
}
bool setJSHTMLAnchorElementPathname(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(thisValue);
JSHTMLAnchorElement* castedThis = jsDynamicCast<JSHTMLAnchorElement*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "HTMLAnchorElement", "pathname");
}
auto& impl = castedThis->wrapped();
auto nativeValue = valueToUSVString(state, value);
RETURN_IF_EXCEPTION(throwScope, false);
impl.setPathname(WTFMove(nativeValue));
return true;
}
bool setJSHTMLAnchorElementSearch(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(thisValue);
JSHTMLAnchorElement* castedThis = jsDynamicCast<JSHTMLAnchorElement*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "HTMLAnchorElement", "search");
}
auto& impl = castedThis->wrapped();
auto nativeValue = valueToUSVString(state, value);
RETURN_IF_EXCEPTION(throwScope, false);
impl.setSearch(WTFMove(nativeValue));
return true;
}
bool setJSHTMLAnchorElementHash(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(thisValue);
JSHTMLAnchorElement* castedThis = jsDynamicCast<JSHTMLAnchorElement*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "HTMLAnchorElement", "hash");
}
auto& impl = castedThis->wrapped();
auto nativeValue = valueToUSVString(state, value);
RETURN_IF_EXCEPTION(throwScope, false);
impl.setHash(WTFMove(nativeValue));
return true;
}
JSValue JSHTMLAnchorElement::getConstructor(VM& vm, const JSGlobalObject* globalObject)
{
return getDOMConstructor<JSHTMLAnchorElementConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject));
}
EncodedJSValue JSC_HOST_CALL jsHTMLAnchorElementPrototypeFunctionToString(ExecState* state)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
JSValue thisValue = state->thisValue();
auto castedThis = jsDynamicCast<JSHTMLAnchorElement*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*state, throwScope, "HTMLAnchorElement", "toString");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSHTMLAnchorElement::info());
auto& impl = castedThis->wrapped();
JSValue result = jsStringWithCache(state, impl.href());
return JSValue::encode(result);
}
void JSHTMLAnchorElement::visitChildren(JSCell* cell, SlotVisitor& visitor)
{
auto* thisObject = jsCast<JSHTMLAnchorElement*>(cell);
ASSERT_GC_OBJECT_INHERITS(thisObject, info());
Base::visitChildren(thisObject, visitor);
thisObject->wrapped().visitJSEventListeners(visitor);
}
}