本文整理汇总了C++中HTMLScriptElement类的典型用法代码示例。如果您正苦于以下问题:C++ HTMLScriptElement类的具体用法?C++ HTMLScriptElement怎么用?C++ HTMLScriptElement使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了HTMLScriptElement类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: jsHTMLScriptElementType
JSValue jsHTMLScriptElementType(ExecState* exec, const Identifier&, const PropertySlot& slot)
{
JSHTMLScriptElement* castedThis = static_cast<JSHTMLScriptElement*>(asObject(slot.slotBase()));
UNUSED_PARAM(exec);
HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(castedThis->impl());
return jsString(exec, imp->type());
}
示例2: switch
void JSHTMLScriptElement::putValueProperty(ExecState* exec, int token, JSValue* value)
{
switch (token) {
case TextAttrNum: {
HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(impl());
imp->setText(valueToStringWithNullCheck(exec, value));
break;
}
case HtmlForAttrNum: {
HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(impl());
imp->setHtmlFor(valueToStringWithNullCheck(exec, value));
break;
}
case EventAttrNum: {
HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(impl());
imp->setEvent(valueToStringWithNullCheck(exec, value));
break;
}
case CharsetAttrNum: {
HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(impl());
imp->setCharset(valueToStringWithNullCheck(exec, value));
break;
}
case DeferAttrNum: {
HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(impl());
imp->setDefer(value->toBoolean(exec));
break;
}
case SrcAttrNum: {
HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(impl());
imp->setSrc(valueToStringWithNullCheck(exec, value));
break;
}
case TypeAttrNum: {
HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(impl());
imp->setType(valueToStringWithNullCheck(exec, value));
break;
}
}
}