本文整理汇总了C++中JSNamedNodeMap::globalObject方法的典型用法代码示例。如果您正苦于以下问题:C++ JSNamedNodeMap::globalObject方法的具体用法?C++ JSNamedNodeMap::globalObject怎么用?C++ JSNamedNodeMap::globalObject使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JSNamedNodeMap
的用法示例。
在下文中一共展示了JSNamedNodeMap::globalObject方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: jsNamedNodeMapPrototypeFunctionItem
JSValue JSC_HOST_CALL jsNamedNodeMapPrototypeFunctionItem(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
{
UNUSED_PARAM(args);
if (!thisValue.inherits(&JSNamedNodeMap::s_info))
return throwError(exec, TypeError);
JSNamedNodeMap* castedThisObj = static_cast<JSNamedNodeMap*>(asObject(thisValue));
NamedNodeMap* imp = static_cast<NamedNodeMap*>(castedThisObj->impl());
unsigned index = args.at(0).toInt32(exec);
JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->item(index)));
return result;
}
示例2: jsNamedNodeMapPrototypeFunctionGetNamedItemNS
JSValue JSC_HOST_CALL jsNamedNodeMapPrototypeFunctionGetNamedItemNS(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
{
UNUSED_PARAM(args);
if (!thisValue.inherits(&JSNamedNodeMap::s_info))
return throwError(exec, TypeError);
JSNamedNodeMap* castedThisObj = static_cast<JSNamedNodeMap*>(asObject(thisValue));
NamedNodeMap* imp = static_cast<NamedNodeMap*>(castedThisObj->impl());
const UString& namespaceURI = valueToStringWithNullCheck(exec, args.at(0));
const UString& localName = args.at(1).toString(exec);
JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getNamedItemNS(namespaceURI, localName)));
return result;
}
示例3: jsNamedNodeMapPrototypeFunctionSetNamedItemNS
JSValue JSC_HOST_CALL jsNamedNodeMapPrototypeFunctionSetNamedItemNS(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
{
UNUSED_PARAM(args);
if (!thisValue.inherits(&JSNamedNodeMap::s_info))
return throwError(exec, TypeError);
JSNamedNodeMap* castedThisObj = static_cast<JSNamedNodeMap*>(asObject(thisValue));
NamedNodeMap* imp = static_cast<NamedNodeMap*>(castedThisObj->impl());
ExceptionCode ec = 0;
Node* node = toNode(args.at(0));
JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->setNamedItemNS(node, ec)));
setDOMException(exec, ec);
return result;
}
示例4: jsNamedNodeMapPrototypeFunctionItem
EncodedJSValue JSC_HOST_CALL jsNamedNodeMapPrototypeFunctionItem(ExecState* exec)
{
JSValue thisValue = exec->hostThisValue();
if (!thisValue.inherits(&JSNamedNodeMap::s_info))
return throwVMTypeError(exec);
JSNamedNodeMap* castedThis = static_cast<JSNamedNodeMap*>(asObject(thisValue));
NamedNodeMap* imp = static_cast<NamedNodeMap*>(castedThis->impl());
unsigned index(exec->argument(0).toUInt32(exec));
if (exec->hadException())
return JSValue::encode(jsUndefined());
JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->item(index)));
return JSValue::encode(result);
}
示例5: jsNamedNodeMapPrototypeFunctionGetNamedItem
EncodedJSValue JSC_HOST_CALL jsNamedNodeMapPrototypeFunctionGetNamedItem(ExecState* exec)
{
JSValue thisValue = exec->hostThisValue();
if (!thisValue.inherits(&JSNamedNodeMap::s_info))
return throwVMTypeError(exec);
JSNamedNodeMap* castedThis = static_cast<JSNamedNodeMap*>(asObject(thisValue));
ASSERT_GC_OBJECT_INHERITS(castedThis, &JSNamedNodeMap::s_info);
NamedNodeMap* imp = static_cast<NamedNodeMap*>(castedThis->impl());
const String& name(ustringToString(exec->argument(0).toString(exec)));
if (exec->hadException())
return JSValue::encode(jsUndefined());
JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->getNamedItem(name)));
return JSValue::encode(result);
}
示例6: jsNamedNodeMapPrototypeFunctionSetNamedItemNS
EncodedJSValue JSC_HOST_CALL jsNamedNodeMapPrototypeFunctionSetNamedItemNS(ExecState* exec)
{
JSValue thisValue = exec->hostThisValue();
if (!thisValue.inherits(&JSNamedNodeMap::s_info))
return throwVMTypeError(exec);
JSNamedNodeMap* castedThis = static_cast<JSNamedNodeMap*>(asObject(thisValue));
NamedNodeMap* imp = static_cast<NamedNodeMap*>(castedThis->impl());
ExceptionCode ec = 0;
Node* node(toNode(exec->argument(0)));
if (exec->hadException())
return JSValue::encode(jsUndefined());
JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->setNamedItemNS(node, ec)));
setDOMException(exec, ec);
return JSValue::encode(result);
}
示例7: jsNamedNodeMapPrototypeFunctionRemoveNamedItemNS
EncodedJSValue JSC_HOST_CALL jsNamedNodeMapPrototypeFunctionRemoveNamedItemNS(ExecState* exec)
{
JSValue thisValue = exec->hostThisValue();
if (!thisValue.inherits(&JSNamedNodeMap::s_info))
return throwVMTypeError(exec);
JSNamedNodeMap* castedThis = static_cast<JSNamedNodeMap*>(asObject(thisValue));
NamedNodeMap* imp = static_cast<NamedNodeMap*>(castedThis->impl());
ExceptionCode ec = 0;
const String& namespaceURI(valueToStringWithNullCheck(exec, exec->argument(0)));
if (exec->hadException())
return JSValue::encode(jsUndefined());
const String& localName(ustringToString(exec->argument(1).toString(exec)));
if (exec->hadException())
return JSValue::encode(jsUndefined());
JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->removeNamedItemNS(namespaceURI, localName, ec)));
setDOMException(exec, ec);
return JSValue::encode(result);
}
示例8: nameGetter
JSValue JSNamedNodeMap::nameGetter(ExecState* exec, JSValue slotBase, const Identifier& propertyName)
{
JSNamedNodeMap* thisObj = static_cast<JSNamedNodeMap*>(asObject(slotBase));
return toJS(exec, thisObj->globalObject(), thisObj->impl()->getNamedItem(identifierToString(propertyName)));
}
示例9: indexGetter
JSValue JSNamedNodeMap::indexGetter(ExecState* exec, JSValue slotBase, unsigned index)
{
JSNamedNodeMap* thisObj = static_cast<JSNamedNodeMap*>(asObject(slotBase));
ASSERT_GC_OBJECT_INHERITS(thisObj, &s_info);
return toJS(exec, thisObj->globalObject(), static_cast<NamedNodeMap*>(thisObj->impl())->item(index));
}
示例10: jsNamedNodeMapConstructor
JSValue jsNamedNodeMapConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
{
JSNamedNodeMap* domObject = static_cast<JSNamedNodeMap*>(asObject(slotBase));
return JSNamedNodeMap::getConstructor(exec, domObject->globalObject());
}
示例11: nameGetter
EncodedJSValue JSNamedNodeMap::nameGetter(ExecState* exec, JSObject* slotBase, EncodedJSValue, PropertyName propertyName)
{
JSNamedNodeMap* thisObj = jsCast<JSNamedNodeMap*>(slotBase);
return JSValue::encode(toJS(exec, thisObj->globalObject(), thisObj->impl().getNamedItem(propertyNameToAtomicString(propertyName))));
}