static v8::Handle<v8::Value> textAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) { INC_STATS("DOM.HTMLTitleElement.text._get"); HTMLTitleElement* imp = V8HTMLTitleElement::toNative(info.Holder()); if (!R_check(imp)) return v8::Handle<v8::Value>(v8::Undefined()); return v8String(imp->text()); }
static void textAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) { HTMLTitleElement* imp = V8HTMLTitleElement::toNative(info.Holder()); V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, v, value); imp->setText(v); return; }
static void textAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) { INC_STATS("DOM.HTMLTitleElement.text._set"); HTMLTitleElement* imp = V8HTMLTitleElement::toNative(info.Holder()); V8Parameter<WithNullCheck> v = value; imp->setText(v); return; }
JSValue jsHTMLTitleElementText(ExecState* exec, JSValue slotBase, const Identifier&) { JSHTMLTitleElement* castedThis = static_cast<JSHTMLTitleElement*>(asObject(slotBase)); UNUSED_PARAM(exec); HTMLTitleElement* imp = static_cast<HTMLTitleElement*>(castedThis->impl()); JSValue result = jsString(exec, imp->text()); return result; }
void JSHTMLTitleElement::putValueProperty(ExecState* exec, int token, JSValue* value) { switch (token) { case TextAttrNum: { HTMLTitleElement* imp = static_cast<HTMLTitleElement*>(impl()); imp->setText(valueToStringWithNullCheck(exec, value)); break; } } }
JSValue* JSHTMLTitleElement::getValueProperty(ExecState* exec, int token) const { switch (token) { case TextAttrNum: { HTMLTitleElement* imp = static_cast<HTMLTitleElement*>(impl()); return jsString(exec, imp->text()); } case ConstructorAttrNum: return getConstructor(exec); } return 0; }
HTMLDocument* DOMImplementation::createHTMLDocument(const String& title) { DocumentInit init = DocumentInit::fromContext(document().contextDocument()) .withRegistrationContext(document().registrationContext()); HTMLDocument* d = HTMLDocument::create(init); d->open(); d->write("<!doctype html><html><head></head><body></body></html>"); if (!title.isNull()) { HTMLHeadElement* headElement = d->head(); DCHECK(headElement); HTMLTitleElement* titleElement = HTMLTitleElement::create(*d); headElement->appendChild(titleElement); titleElement->appendChild(d->createTextNode(title), ASSERT_NO_EXCEPTION); } d->setSecurityOrigin(document().getSecurityOrigin()); d->setContextFeatures(document().contextFeatures()); return d; }
static v8::Handle<v8::Value> textAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) { HTMLTitleElement* imp = V8HTMLTitleElement::toNative(info.Holder()); return v8String(imp->text(), info.GetIsolate()); }
void setJSHTMLTitleElementText(ExecState* exec, JSObject* thisObject, JSValue value) { JSHTMLTitleElement* castedThis = static_cast<JSHTMLTitleElement*>(thisObject); HTMLTitleElement* imp = static_cast<HTMLTitleElement*>(castedThis->impl()); imp->setText(valueToStringWithNullCheck(exec, value)); }