当前位置: 首页>>代码示例>>C++>>正文


C++ JSHTMLObjectElement类代码示例

本文整理汇总了C++中JSHTMLObjectElement的典型用法代码示例。如果您正苦于以下问题:C++ JSHTMLObjectElement类的具体用法?C++ JSHTMLObjectElement怎么用?C++ JSHTMLObjectElement使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了JSHTMLObjectElement类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: setJSHTMLObjectElementCodeBase

void setJSHTMLObjectElementCodeBase(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
    JSValue value = JSValue::decode(encodedValue);
    UNUSED_PARAM(exec);
    JSHTMLObjectElement* castedThis = jsDynamicCast<JSHTMLObjectElement*>(JSValue::decode(thisValue));
    if (!castedThis) {
        throwVMTypeError(exec);
        return;
    }
    HTMLObjectElement& impl = castedThis->impl();
    const String& nativeValue(valueToStringWithNullCheck(exec, value));
    if (exec->hadException())
        return;
    impl.setAttribute(WebCore::HTMLNames::codebaseAttr, nativeValue);
}
开发者ID:,项目名称:,代码行数:15,代码来源:

示例2: jsHTMLObjectElementPrototypeFunctionSetCustomValidity

EncodedJSValue JSC_HOST_CALL jsHTMLObjectElementPrototypeFunctionSetCustomValidity(ExecState* exec)
{
    JSValue thisValue = exec->hostThisValue();
    JSHTMLObjectElement* castedThis = jsDynamicCast<JSHTMLObjectElement*>(thisValue);
    if (!castedThis)
        return throwVMTypeError(exec);
    ASSERT_GC_OBJECT_INHERITS(castedThis, JSHTMLObjectElement::info());
    HTMLObjectElement& impl = castedThis->impl();
    if (exec->argumentCount() < 1)
        return throwVMError(exec, createNotEnoughArgumentsError(exec));
    const String& error(valueToStringWithUndefinedOrNullCheck(exec, exec->argument(0)));
    if (exec->hadException())
        return JSValue::encode(jsUndefined());
    impl.setCustomValidity(error);
    return JSValue::encode(jsUndefined());
}
开发者ID:,项目名称:,代码行数:16,代码来源:

示例3: jsHTMLObjectElementPrototypeFunctionGetSVGDocument

EncodedJSValue JSC_HOST_CALL jsHTMLObjectElementPrototypeFunctionGetSVGDocument(ExecState* exec)
{
    JSValue thisValue = exec->hostThisValue();
    if (!thisValue.inherits(&JSHTMLObjectElement::s_info))
        return throwVMTypeError(exec);
    JSHTMLObjectElement* castedThis = static_cast<JSHTMLObjectElement*>(asObject(thisValue));
    HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThis->impl());
    ExceptionCode ec = 0;
    if (!checkNodeSecurity(exec, imp->getSVGDocument(ec)))
        return JSValue::encode(jsUndefined());


    JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->getSVGDocument(ec)));
    setDOMException(exec, ec);
    return JSValue::encode(result);
}
开发者ID:13W,项目名称:phantomjs,代码行数:16,代码来源:JSHTMLObjectElement.cpp

示例4: setJSHTMLObjectElementWidth

void setJSHTMLObjectElementWidth(ExecState* exec, JSObject* thisObject, JSValue value)
{
    JSHTMLObjectElement* castedThis = static_cast<JSHTMLObjectElement*>(thisObject);
    HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThis->impl());
    imp->setAttribute(WebCore::HTMLNames::widthAttr, valueToStringWithNullCheck(exec, value));
}
开发者ID:13W,项目名称:phantomjs,代码行数:6,代码来源:JSHTMLObjectElement.cpp

示例5: setJSHTMLObjectElementVspace

void setJSHTMLObjectElementVspace(ExecState* exec, JSObject* thisObject, JSValue value)
{
    JSHTMLObjectElement* castedThis = static_cast<JSHTMLObjectElement*>(thisObject);
    HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThis->impl());
    imp->setIntegralAttribute(WebCore::HTMLNames::vspaceAttr, value.toInt32(exec));
}
开发者ID:13W,项目名称:phantomjs,代码行数:6,代码来源:JSHTMLObjectElement.cpp

示例6: setJSHTMLObjectElementDeclare

void setJSHTMLObjectElementDeclare(ExecState* exec, JSObject* thisObject, JSValue value)
{
    JSHTMLObjectElement* castedThis = static_cast<JSHTMLObjectElement*>(thisObject);
    HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThis->impl());
    imp->setBooleanAttribute(WebCore::HTMLNames::declareAttr, value.toBoolean(exec));
}
开发者ID:13W,项目名称:phantomjs,代码行数:6,代码来源:JSHTMLObjectElement.cpp

示例7: jsHTMLObjectElementConstructor

JSValue jsHTMLObjectElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
{
    JSHTMLObjectElement* domObject = static_cast<JSHTMLObjectElement*>(asObject(slotBase));
    return JSHTMLObjectElement::getConstructor(exec, domObject->globalObject());
}
开发者ID:13W,项目名称:phantomjs,代码行数:5,代码来源:JSHTMLObjectElement.cpp

示例8: jsHTMLObjectElementContentDocument

JSValue jsHTMLObjectElementContentDocument(ExecState* exec, JSValue slotBase, const Identifier&)
{
    JSHTMLObjectElement* castedThis = static_cast<JSHTMLObjectElement*>(asObject(slotBase));
    HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThis->impl());
    return checkNodeSecurity(exec, imp->contentDocument()) ? toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->contentDocument())) : jsUndefined();
}
开发者ID:13W,项目名称:phantomjs,代码行数:6,代码来源:JSHTMLObjectElement.cpp


注:本文中的JSHTMLObjectElement类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。