KeyEvent.wrap 构造函数
- KeyboardEvent parent
使用 parent
作为我们要仿真的事件来构建一个 KeyEvent。
实现
KeyEvent.wrap(KeyboardEvent parent)
: _parent = parent,
_shadowAltKey = false,
_shadowCharCode = 0,
_shadowKeyCode = 0,
super(parent) {
_parent = parent;
_shadowAltKey = _realAltKey;
_shadowCharCode = _realCharCode;
_shadowKeyCode = _realKeyCode;
_currentTarget = _parent.currentTarget;
}