JSValue jsClipboardItems(ExecState* exec, JSValue slotBase, const Identifier&) { JSClipboard* castedThis = static_cast<JSClipboard*>(asObject(slotBase)); UNUSED_PARAM(exec); Clipboard* imp = static_cast<Clipboard*>(castedThis->impl()); JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->items())); return result; }
JSValue jsClipboardEffectAllowed(ExecState* exec, JSValue slotBase, const Identifier&) { JSClipboard* castedThis = static_cast<JSClipboard*>(asObject(slotBase)); UNUSED_PARAM(exec); Clipboard* imp = static_cast<Clipboard*>(castedThis->impl()); JSValue result = jsStringOrUndefined(exec, imp->effectAllowed()); return result; }
EncodedJSValue JSC_HOST_CALL jsClipboardPrototypeFunctionSetData(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); if (!thisValue.inherits(&JSClipboard::s_info)) return throwVMTypeError(exec); JSClipboard* castedThis = static_cast<JSClipboard*>(asObject(thisValue)); ASSERT_GC_OBJECT_INHERITS(castedThis, &JSClipboard::s_info); Clipboard* imp = static_cast<Clipboard*>(castedThis->impl()); if (exec->argumentCount() < 2) return JSValue::encode(jsUndefined()); const String& type(ustringToString(exec->argument(0).toString(exec))); if (exec->hadException()) return JSValue::encode(jsUndefined()); const String& data(ustringToString(exec->argument(1).toString(exec))); if (exec->hadException()) return JSValue::encode(jsUndefined()); JSC::JSValue result = jsBoolean(imp->setData(type, data)); return JSValue::encode(result); }
void setJSClipboardEffectAllowed(ExecState* exec, JSObject* thisObject, JSValue value) { JSClipboard* castedThis = static_cast<JSClipboard*>(thisObject); Clipboard* imp = static_cast<Clipboard*>(castedThis->impl()); imp->setEffectAllowed(ustringToString(value.toString(exec))); }