本文整理汇总了C++中JSKeyboardEvent类的典型用法代码示例。如果您正苦于以下问题:C++ JSKeyboardEvent类的具体用法?C++ JSKeyboardEvent怎么用?C++ JSKeyboardEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了JSKeyboardEvent类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: jsKeyboardEventAltGraphKey
JSValue jsKeyboardEventAltGraphKey(ExecState* exec, const Identifier&, const PropertySlot& slot)
{
JSKeyboardEvent* castedThis = static_cast<JSKeyboardEvent*>(asObject(slot.slotBase()));
UNUSED_PARAM(exec);
KeyboardEvent* imp = static_cast<KeyboardEvent*>(castedThis->impl());
return jsBoolean(imp->altGraphKey());
}
示例2: jsKeyboardEventAltGraphKey
JSValue jsKeyboardEventAltGraphKey(ExecState* exec, JSValue slotBase, const Identifier&)
{
JSKeyboardEvent* castedThis = static_cast<JSKeyboardEvent*>(asObject(slotBase));
UNUSED_PARAM(exec);
KeyboardEvent* imp = static_cast<KeyboardEvent*>(castedThis->impl());
JSValue result = jsBoolean(imp->altGraphKey());
return result;
}
示例3: jsKeyboardEventConstructor
EncodedJSValue jsKeyboardEventConstructor(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue, PropertyName)
{
JSKeyboardEvent* domObject = jsDynamicCast<JSKeyboardEvent*>(JSValue::decode(thisValue));
if (!domObject)
return throwVMTypeError(exec);
if (!domObject)
return throwVMTypeError(exec);
return JSValue::encode(JSKeyboardEvent::getConstructor(exec->vm(), domObject->globalObject()));
}
示例4: jsKeyboardEventAltGraphKey
EncodedJSValue jsKeyboardEventAltGraphKey(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
{
JSKeyboardEvent* castedThis = jsDynamicCast<JSKeyboardEvent*>(JSValue::decode(thisValue));
UNUSED_PARAM(slotBase);
if (!castedThis)
return throwVMTypeError(exec);
UNUSED_PARAM(exec);
KeyboardEvent& impl = castedThis->impl();
JSValue result = jsBoolean(impl.altGraphKey());
return JSValue::encode(result);
}
示例5: jsKeyboardEventKeyIdentifier
EncodedJSValue jsKeyboardEventKeyIdentifier(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
{
JSKeyboardEvent* castedThis = jsDynamicCast<JSKeyboardEvent*>(JSValue::decode(thisValue));
UNUSED_PARAM(slotBase);
if (!castedThis)
return throwVMTypeError(exec);
UNUSED_PARAM(exec);
KeyboardEvent& impl = castedThis->impl();
JSValue result = jsStringWithCache(exec, impl.keyIdentifier());
return JSValue::encode(result);
}
示例6: jsKeyboardEventPrototypeFunctionInitKeyboardEvent
EncodedJSValue JSC_HOST_CALL jsKeyboardEventPrototypeFunctionInitKeyboardEvent(ExecState* exec)
{
JSValue thisValue = exec->hostThisValue();
JSKeyboardEvent* castedThis = jsDynamicCast<JSKeyboardEvent*>(thisValue);
if (!castedThis)
return throwVMTypeError(exec);
ASSERT_GC_OBJECT_INHERITS(castedThis, JSKeyboardEvent::info());
KeyboardEvent& impl = castedThis->impl();
const String& type(exec->argument(0).isEmpty() ? String() : exec->argument(0).toString(exec)->value(exec));
if (exec->hadException())
return JSValue::encode(jsUndefined());
bool canBubble(exec->argument(1).toBoolean(exec));
if (exec->hadException())
return JSValue::encode(jsUndefined());
bool cancelable(exec->argument(2).toBoolean(exec));
if (exec->hadException())
return JSValue::encode(jsUndefined());
DOMWindow* view(toDOMWindow(exec->argument(3)));
if (exec->hadException())
return JSValue::encode(jsUndefined());
const String& keyIdentifier(exec->argument(4).isEmpty() ? String() : exec->argument(4).toString(exec)->value(exec));
if (exec->hadException())
return JSValue::encode(jsUndefined());
unsigned location(toUInt32(exec, exec->argument(5), NormalConversion));
if (exec->hadException())
return JSValue::encode(jsUndefined());
bool ctrlKey(exec->argument(6).toBoolean(exec));
if (exec->hadException())
return JSValue::encode(jsUndefined());
bool altKey(exec->argument(7).toBoolean(exec));
if (exec->hadException())
return JSValue::encode(jsUndefined());
bool shiftKey(exec->argument(8).toBoolean(exec));
if (exec->hadException())
return JSValue::encode(jsUndefined());
bool metaKey(exec->argument(9).toBoolean(exec));
if (exec->hadException())
return JSValue::encode(jsUndefined());
bool altGraphKey(exec->argument(10).toBoolean(exec));
if (exec->hadException())
return JSValue::encode(jsUndefined());
impl.initKeyboardEvent(type, canBubble, cancelable, view, keyIdentifier, location, ctrlKey, altKey, shiftKey, metaKey, altGraphKey);
return JSValue::encode(jsUndefined());
}
示例7: jsKeyboardEventPrototypeFunctionInitKeyboardEvent
JSValue* jsKeyboardEventPrototypeFunctionInitKeyboardEvent(ExecState* exec, JSObject*, JSValue* thisValue, const ArgList& args)
{
if (!thisValue->isObject(&JSKeyboardEvent::s_info))
return throwError(exec, TypeError);
JSKeyboardEvent* castedThisObj = static_cast<JSKeyboardEvent*>(thisValue);
KeyboardEvent* imp = static_cast<KeyboardEvent*>(castedThisObj->impl());
const UString& type = args[0]->toString(exec);
bool canBubble = args[1]->toBoolean(exec);
bool cancelable = args[2]->toBoolean(exec);
DOMWindow* view = toDOMWindow(args[3]);
const UString& keyIdentifier = args[4]->toString(exec);
unsigned keyLocation = args[5]->toInt32(exec);
bool ctrlKey = args[6]->toBoolean(exec);
bool altKey = args[7]->toBoolean(exec);
bool shiftKey = args[8]->toBoolean(exec);
bool metaKey = args[9]->toBoolean(exec);
bool altGraphKey = args[10]->toBoolean(exec);
imp->initKeyboardEvent(type, canBubble, cancelable, view, keyIdentifier, keyLocation, ctrlKey, altKey, shiftKey, metaKey, altGraphKey);
return jsUndefined();
}
示例8: jsKeyboardEventPrototypeFunctionInitKeyboardEvent
JSValue JSC_HOST_CALL jsKeyboardEventPrototypeFunctionInitKeyboardEvent(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
{
UNUSED_PARAM(args);
if (!thisValue.inherits(&JSKeyboardEvent::s_info))
return throwError(exec, TypeError);
JSKeyboardEvent* castedThisObj = static_cast<JSKeyboardEvent*>(asObject(thisValue));
KeyboardEvent* imp = static_cast<KeyboardEvent*>(castedThisObj->impl());
const UString& type = args.at(0).toString(exec);
bool canBubble = args.at(1).toBoolean(exec);
bool cancelable = args.at(2).toBoolean(exec);
DOMWindow* view = toDOMWindow(args.at(3));
const UString& keyIdentifier = args.at(4).toString(exec);
unsigned keyLocation = args.at(5).toInt32(exec);
bool ctrlKey = args.at(6).toBoolean(exec);
bool altKey = args.at(7).toBoolean(exec);
bool shiftKey = args.at(8).toBoolean(exec);
bool metaKey = args.at(9).toBoolean(exec);
bool altGraphKey = args.at(10).toBoolean(exec);
imp->initKeyboardEvent(type, canBubble, cancelable, view, keyIdentifier, keyLocation, ctrlKey, altKey, shiftKey, metaKey, altGraphKey);
return jsUndefined();
}
示例9: jsKeyboardEventConstructor
JSValue jsKeyboardEventConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot)
{
JSKeyboardEvent* domObject = static_cast<JSKeyboardEvent*>(asObject(slot.slotBase()));
return JSKeyboardEvent::getConstructor(exec, domObject->globalObject());
}
示例10: jsKeyboardEventConstructor
JSValue jsKeyboardEventConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
{
JSKeyboardEvent* domObject = static_cast<JSKeyboardEvent*>(asObject(slotBase));
return JSKeyboardEvent::getConstructor(exec, domObject->globalObject());
}