本文整理汇总了C++中HTMLButtonElement类的典型用法代码示例。如果您正苦于以下问题:C++ HTMLButtonElement类的具体用法?C++ HTMLButtonElement怎么用?C++ HTMLButtonElement使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了HTMLButtonElement类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: disabledAttrSetter
static void disabledAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
HTMLButtonElement* imp = V8HTMLButtonElement::toNative(info.Holder());
bool v = value->BooleanValue();
imp->setBooleanAttribute(WebCore::HTMLNames::disabledAttr, v);
return;
}
示例2: switch
void JSHTMLButtonElement::putValueProperty(ExecState* exec, int token, JSValue* value)
{
switch (token) {
case AccessKeyAttrNum: {
HTMLButtonElement* imp = static_cast<HTMLButtonElement*>(impl());
imp->setAccessKey(valueToStringWithNullCheck(exec, value));
break;
}
case DisabledAttrNum: {
HTMLButtonElement* imp = static_cast<HTMLButtonElement*>(impl());
imp->setDisabled(value->toBoolean(exec));
break;
}
case AutofocusAttrNum: {
HTMLButtonElement* imp = static_cast<HTMLButtonElement*>(impl());
imp->setAutofocus(value->toBoolean(exec));
break;
}
case NameAttrNum: {
HTMLButtonElement* imp = static_cast<HTMLButtonElement*>(impl());
imp->setName(valueToStringWithNullCheck(exec, value));
break;
}
case ValueAttrNum: {
HTMLButtonElement* imp = static_cast<HTMLButtonElement*>(impl());
imp->setValue(valueToStringWithNullCheck(exec, value));
break;
}
}
}
示例3: typeAttrSetter
static void typeAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
HTMLButtonElement* imp = V8HTMLButtonElement::toNative(info.Holder());
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, v, value);
imp->setType(v);
return;
}
示例4: setCustomValidityCallback
static v8::Handle<v8::Value> setCustomValidityCallback(const v8::Arguments& args)
{
if (args.Length() < 1)
return throwNotEnoughArgumentsError(args.GetIsolate());
HTMLButtonElement* imp = V8HTMLButtonElement::toNative(args.Holder());
V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<WithUndefinedOrNullCheck>, error, MAYBE_MISSING_PARAMETER(args, 0, DefaultIsUndefined));
imp->setCustomValidity(error);
return v8Undefined();
}
示例5: jsHTMLButtonElementPrototypeFunctionClick
JSValue* jsHTMLButtonElementPrototypeFunctionClick(ExecState* exec, JSObject*, JSValue* thisValue, const ArgList& args)
{
if (!thisValue->isObject(&JSHTMLButtonElement::s_info))
return throwError(exec, TypeError);
JSHTMLButtonElement* castedThisObj = static_cast<JSHTMLButtonElement*>(thisValue);
HTMLButtonElement* imp = static_cast<HTMLButtonElement*>(castedThisObj->impl());
imp->click();
return jsUndefined();
}
示例6: throwError
JSValue* JSHTMLButtonElementPrototypeFunction::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)
{
if (!thisObj->inherits(&JSHTMLButtonElement::info))
return throwError(exec, TypeError);
HTMLButtonElement* imp = static_cast<HTMLButtonElement*>(static_cast<JSHTMLButtonElement*>(thisObj)->impl());
switch (id) {
case JSHTMLButtonElement::ClickFuncNum: {
imp->click();
return jsUndefined();
}
}
return 0;
}
示例7: checkValidityCallback
static v8::Handle<v8::Value> checkValidityCallback(const v8::Arguments& args)
{
HTMLButtonElement* imp = V8HTMLButtonElement::toNative(args.Holder());
return v8Boolean(imp->checkValidity(), args.GetIsolate());
}
示例8: willValidateAttrGetter
static v8::Handle<v8::Value> willValidateAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
HTMLButtonElement* imp = V8HTMLButtonElement::toNative(info.Holder());
return v8Boolean(imp->willValidate(), info.GetIsolate());
}
示例9: formEnctypeAttrGetter
static v8::Handle<v8::Value> formEnctypeAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
HTMLButtonElement* imp = V8HTMLButtonElement::toNative(info.Holder());
return v8String(imp->formEnctype(), info.GetIsolate());
}
示例10: formActionAttrGetter
static v8::Handle<v8::Value> formActionAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
HTMLButtonElement* imp = V8HTMLButtonElement::toNative(info.Holder());
return v8String(imp->getURLAttribute(WebCore::HTMLNames::formactionAttr), info.GetIsolate());
}
示例11: formAttrGetter
static v8::Handle<v8::Value> formAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
HTMLButtonElement* imp = V8HTMLButtonElement::toNative(info.Holder());
return toV8Fast(imp->form(), info, imp);
}
示例12: disabledAttrGetter
static v8::Handle<v8::Value> disabledAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
HTMLButtonElement* imp = V8HTMLButtonElement::toNative(info.Holder());
return v8Boolean(imp->fastHasAttribute(WebCore::HTMLNames::disabledAttr), info.GetIsolate());
}