Example #1
0
void setJSCSSCharsetRuleEncoding(ExecState* exec, JSObject* thisObject, JSValue value)
{
    JSCSSCharsetRule* castedThis = static_cast<JSCSSCharsetRule*>(thisObject);
    CSSCharsetRule* imp = static_cast<CSSCharsetRule*>(castedThis->impl());
    ExceptionCode ec = 0;
    imp->setEncoding(valueToStringWithNullCheck(exec, value), ec);
    setDOMException(exec, ec);
}
Example #2
0
JSValue jsCSSCharsetRuleEncoding(ExecState* exec, JSValue slotBase, const Identifier&)
{
    JSCSSCharsetRule* castedThis = static_cast<JSCSSCharsetRule*>(asObject(slotBase));
    UNUSED_PARAM(exec);
    CSSCharsetRule* imp = static_cast<CSSCharsetRule*>(castedThis->impl());
    JSValue result = jsStringOrNull(exec, imp->encoding());
    return result;
}
EncodedJSValue jsCSSCharsetRuleConstructor(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue, PropertyName)
{
    JSCSSCharsetRule* domObject = jsDynamicCast<JSCSSCharsetRule*>(JSValue::decode(thisValue));
    if (!domObject)
        return throwVMTypeError(exec);
    if (!domObject)
        return throwVMTypeError(exec);
    return JSValue::encode(JSCSSCharsetRule::getConstructor(exec->vm(), domObject->globalObject()));
}
EncodedJSValue jsCSSCharsetRuleEncoding(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
{
    JSCSSCharsetRule* castedThis = jsDynamicCast<JSCSSCharsetRule*>(JSValue::decode(thisValue));
    UNUSED_PARAM(slotBase);
    if (!castedThis)
        return throwVMTypeError(exec);
    UNUSED_PARAM(exec);
    CSSCharsetRule& impl = castedThis->impl();
    JSValue result = jsStringOrNull(exec, impl.encoding());
    return JSValue::encode(result);
}
void setJSCSSCharsetRuleEncoding(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
    JSValue value = JSValue::decode(encodedValue);
    UNUSED_PARAM(exec);
    JSCSSCharsetRule* castedThis = jsDynamicCast<JSCSSCharsetRule*>(JSValue::decode(thisValue));
    if (!castedThis) {
        throwVMTypeError(exec);
        return;
    }
    CSSCharsetRule& impl = castedThis->impl();
    ExceptionCode ec = 0;
    const String& nativeValue(valueToStringWithNullCheck(exec, value));
    if (exec->hadException())
        return;
    impl.setEncoding(nativeValue, ec);
    setDOMException(exec, ec);
}
Example #6
0
JSValue jsCSSCharsetRuleConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
{
    JSCSSCharsetRule* domObject = static_cast<JSCSSCharsetRule*>(asObject(slotBase));
    return JSCSSCharsetRule::getConstructor(exec, domObject->globalObject());
}