本文整理汇总了C++中HTMLTableSectionElement::insertRow方法的典型用法代码示例。如果您正苦于以下问题:C++ HTMLTableSectionElement::insertRow方法的具体用法?C++ HTMLTableSectionElement::insertRow怎么用?C++ HTMLTableSectionElement::insertRow使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HTMLTableSectionElement
的用法示例。
在下文中一共展示了HTMLTableSectionElement::insertRow方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: jsHTMLTableSectionElementPrototypeFunctionInsertRow
JSValue* jsHTMLTableSectionElementPrototypeFunctionInsertRow(ExecState* exec, JSObject*, JSValue* thisValue, const ArgList& args)
{
if (!thisValue->isObject(&JSHTMLTableSectionElement::s_info))
return throwError(exec, TypeError);
JSHTMLTableSectionElement* castedThisObj = static_cast<JSHTMLTableSectionElement*>(thisValue);
HTMLTableSectionElement* imp = static_cast<HTMLTableSectionElement*>(castedThisObj->impl());
ExceptionCode ec = 0;
int index = args[0]->toInt32(exec);
KJS::JSValue* result = toJS(exec, WTF::getPtr(imp->insertRow(index, ec)));
setDOMException(exec, ec);
return result;
}
示例2: jsHTMLTableSectionElementPrototypeFunctionInsertRow
JSValue JSC_HOST_CALL jsHTMLTableSectionElementPrototypeFunctionInsertRow(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
{
UNUSED_PARAM(args);
if (!thisValue.inherits(&JSHTMLTableSectionElement::s_info))
return throwError(exec, TypeError);
JSHTMLTableSectionElement* castedThisObj = static_cast<JSHTMLTableSectionElement*>(asObject(thisValue));
HTMLTableSectionElement* imp = static_cast<HTMLTableSectionElement*>(castedThisObj->impl());
ExceptionCode ec = 0;
int index = args.at(0).toInt32(exec);
JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->insertRow(index, ec)));
setDOMException(exec, ec);
return result;
}
示例3: callAsFunction
JSValue* JSHTMLTableSectionElementPrototypeFunction::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)
{
if (!thisObj->inherits(&JSHTMLTableSectionElement::info))
return throwError(exec, TypeError);
JSHTMLTableSectionElement* castedThisObj = static_cast<JSHTMLTableSectionElement*>(thisObj);
HTMLTableSectionElement* imp = static_cast<HTMLTableSectionElement*>(castedThisObj->impl());
switch (id) {
case JSHTMLTableSectionElement::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 JSHTMLTableSectionElement::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;
}