本文整理汇总了C++中HTMLTableElement::createTFoot方法的典型用法代码示例。如果您正苦于以下问题:C++ HTMLTableElement::createTFoot方法的具体用法?C++ HTMLTableElement::createTFoot怎么用?C++ HTMLTableElement::createTFoot使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HTMLTableElement
的用法示例。
在下文中一共展示了HTMLTableElement::createTFoot方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: jsHTMLTableElementPrototypeFunctionCreateTFoot
JSValue* jsHTMLTableElementPrototypeFunctionCreateTFoot(ExecState* exec, JSObject*, JSValue* thisValue, const ArgList& args)
{
if (!thisValue->isObject(&JSHTMLTableElement::s_info))
return throwError(exec, TypeError);
JSHTMLTableElement* castedThisObj = static_cast<JSHTMLTableElement*>(thisValue);
HTMLTableElement* imp = static_cast<HTMLTableElement*>(castedThisObj->impl());
KJS::JSValue* result = toJS(exec, WTF::getPtr(imp->createTFoot()));
return result;
}
示例2: callAsFunction
JSValue* JSHTMLTableElementPrototypeFunction::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)
{
if (!thisObj->inherits(&JSHTMLTableElement::info))
return throwError(exec, TypeError);
JSHTMLTableElement* castedThisObj = static_cast<JSHTMLTableElement*>(thisObj);
HTMLTableElement* imp = static_cast<HTMLTableElement*>(castedThisObj->impl());
switch (id) {
case JSHTMLTableElement::CreateTHeadFuncNum: {
KJS::JSValue* result = toJS(exec, WTF::getPtr(imp->createTHead()));
return result;
}
case JSHTMLTableElement::DeleteTHeadFuncNum: {
imp->deleteTHead();
return jsUndefined();
}
case JSHTMLTableElement::CreateTFootFuncNum: {
KJS::JSValue* result = toJS(exec, WTF::getPtr(imp->createTFoot()));
return result;
}
case JSHTMLTableElement::DeleteTFootFuncNum: {
imp->deleteTFoot();
return jsUndefined();
}
case JSHTMLTableElement::CreateCaptionFuncNum: {
KJS::JSValue* result = toJS(exec, WTF::getPtr(imp->createCaption()));
return result;
}
case JSHTMLTableElement::DeleteCaptionFuncNum: {
imp->deleteCaption();
return jsUndefined();
}
case JSHTMLTableElement::InsertRowFuncNum: {
ExceptionCode ec = 0;
bool indexOk;
int index = args[0]->toInt32(exec, indexOk);
if (!indexOk) {
setDOMException(exec, TYPE_MISMATCH_ERR);
return jsUndefined();
}
KJS::JSValue* result = toJS(exec, WTF::getPtr(imp->insertRow(index, ec)));
setDOMException(exec, ec);
return result;
}
case JSHTMLTableElement::DeleteRowFuncNum: {
ExceptionCode ec = 0;
bool indexOk;
int index = args[0]->toInt32(exec, indexOk);
if (!indexOk) {
setDOMException(exec, TYPE_MISMATCH_ERR);
return jsUndefined();
}
imp->deleteRow(index, ec);
setDOMException(exec, ec);
return jsUndefined();
}
}
return 0;
}