From 9ac87e844a08e5131c1e327e616eb19ddfb79948 Mon Sep 17 00:00:00 2001 From: Sunny Date: Fri, 13 Nov 2015 15:41:20 +0800 Subject: [PATCH 01/11] Fix node_bindings link in Simplified Chinese document translation --- docs/development/atom-shell-vs-node-webkit.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/development/atom-shell-vs-node-webkit.md b/docs/development/atom-shell-vs-node-webkit.md index c1fffa304ab5..4431a54eacee 100644 --- a/docs/development/atom-shell-vs-node-webkit.md +++ b/docs/development/atom-shell-vs-node-webkit.md @@ -35,7 +35,7 @@ __3. Node Integration__ In NW.js, the Node integration in web pages requires patching Chromium to work, while in Electron we chose a different way to integrate the libuv loop with each platform's message loop to avoid hacking Chromium. See the -[`node_bindings`](../../atom/common/) code for how that was done. +[`node_bindings`](../../../atom/common/) code for how that was done. __4. Multi-context__ From 2a7f874373c44d1606cbabe2c921763732fca87c Mon Sep 17 00:00:00 2001 From: Robo Date: Sat, 14 Nov 2015 02:25:23 +0530 Subject: [PATCH 02/11] browser: fix reloadignoringcache api --- atom/browser/api/atom_api_web_contents.cc | 5 ----- atom/browser/api/lib/navigation-controller.coffee | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index 601a4ba63f13..1c3334e93669 100644 --- a/atom/browser/api/atom_api_web_contents.cc +++ b/atom/browser/api/atom_api_web_contents.cc @@ -658,10 +658,6 @@ void WebContents::Stop() { web_contents()->Stop(); } -void WebContents::ReloadIgnoringCache() { - web_contents()->GetController().ReloadIgnoringCache(false); -} - void WebContents::GoBack() { atom::AtomBrowserClient::SuppressRendererProcessRestartForOnce(); web_contents()->GetController().GoBack(); @@ -1009,7 +1005,6 @@ mate::ObjectTemplateBuilder WebContents::GetObjectTemplateBuilder( .SetMethod("isLoading", &WebContents::IsLoading) .SetMethod("isWaitingForResponse", &WebContents::IsWaitingForResponse) .SetMethod("_stop", &WebContents::Stop) - .SetMethod("_reloadIgnoringCache", &WebContents::ReloadIgnoringCache) .SetMethod("_goBack", &WebContents::GoBack) .SetMethod("_goForward", &WebContents::GoForward) .SetMethod("_goToOffset", &WebContents::GoToOffset) diff --git a/atom/browser/api/lib/navigation-controller.coffee b/atom/browser/api/lib/navigation-controller.coffee index 7d276e57e31a..d0c539a99db5 100644 --- a/atom/browser/api/lib/navigation-controller.coffee +++ b/atom/browser/api/lib/navigation-controller.coffee @@ -62,8 +62,8 @@ class NavigationController @webContents._loadURL @getURL(), {} reloadIgnoringCache: -> - @webContents._reloadIgnoringCache() # Rely on WebContents to clear cache. - @reload() + @pendingIndex = @currentIndex + @webContents._loadURL @getURL(), {extraHeaders: "pragma: no-cache\n"} canGoBack: -> @getActiveIndex() > 0 From e2959ed3fc4199ec9815bb8cf605d4ae23246029 Mon Sep 17 00:00:00 2001 From: Robo Date: Sat, 14 Nov 2015 12:09:18 +0530 Subject: [PATCH 03/11] add docs --- docs/api/web-contents.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/api/web-contents.md b/docs/api/web-contents.md index 917e0670590c..1c73c5713fa1 100644 --- a/docs/api/web-contents.md +++ b/docs/api/web-contents.md @@ -207,7 +207,13 @@ See [session documentation](session.md) for this object's methods. * `extraHeaders` String - Extra headers separated by "\n" Loads the `url` in the window, the `url` must contain the protocol prefix, -e.g. the `http://` or `file://`. +e.g. the `http://` or `file://`. If the load should bypass http cache then +use the `pragma` header to achieve it. + +```javascript +const options = {"extraHeaders" : "pragma: no-cache\n"} +webContents.loadURL(url, options) +``` ### `webContents.getURL()` From 9f9436d6dc46dd5f583bd66fc6a30d6f4ca928eb Mon Sep 17 00:00:00 2001 From: Heilig Benedek Date: Sat, 14 Nov 2015 23:59:38 +0100 Subject: [PATCH 04/11] Moved scope creation before the allocation of the buffer in `FrameSubscriber` --- atom/browser/api/frame_subscriber.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/atom/browser/api/frame_subscriber.cc b/atom/browser/api/frame_subscriber.cc index 526769f9cd6c..cf0eae14a9a8 100644 --- a/atom/browser/api/frame_subscriber.cc +++ b/atom/browser/api/frame_subscriber.cc @@ -38,6 +38,9 @@ void FrameSubscriber::OnFrameDelivered( if (!result) return; + v8::Locker locker(isolate_); + v8::HandleScope handle_scope(isolate_); + gfx::Rect rect = frame->visible_rect(); size_t rgb_arr_size = rect.width() * rect.height() * 4; v8::MaybeLocal buffer = node::Buffer::New(isolate_, rgb_arr_size); @@ -56,8 +59,6 @@ void FrameSubscriber::OnFrameDelivered( rect.width() * 4, media::YV12); - v8::Locker locker(isolate_); - v8::HandleScope handle_scope(isolate_); callback_.Run(buffer.ToLocalChecked()); } From bb6d7d14989142f3639b6c51f6f91b61bb9d5386 Mon Sep 17 00:00:00 2001 From: Heilig Benedek Date: Mon, 16 Nov 2015 04:15:13 +0100 Subject: [PATCH 05/11] Added the option to `KeyboardEvent` to specify the sent character by it's name (if it can't be sent via the `keyCode` parameter) --- atom/common/keyboad_util.cc | 27 ++++++++++++++++++- atom/common/keyboad_util.h | 7 ++++- .../native_mate_converters/blink_converter.cc | 13 ++++++--- 3 files changed, 42 insertions(+), 5 deletions(-) diff --git a/atom/common/keyboad_util.cc b/atom/common/keyboad_util.cc index 29d1a800c859..942637786198 100644 --- a/atom/common/keyboad_util.cc +++ b/atom/common/keyboad_util.cc @@ -2,12 +2,13 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. +#include #include "atom/common/keyboad_util.h" namespace atom { // Return key code of the char. -ui::KeyboardCode KeyboardCodeFromCharCode(char c, bool* shifted) { +ui::KeyboardCode KeyboardCodeFromCharCode(base::char16 c, bool* shifted) { *shifted = false; switch (c) { case 0x08: return ui::VKEY_BACK; @@ -71,4 +72,28 @@ ui::KeyboardCode KeyboardCodeFromCharCode(char c, bool* shifted) { } } +// Return key code of the char. +ui::KeyboardCode KeyboardCodeFromKeyIdentifier(std::string chr) { + if (chr == "enter") return ui::VKEY_RETURN; + if (chr == "backspace") return ui::VKEY_BACK; + if (chr == "delete") return ui::VKEY_DELETE; + if (chr == "tab") return ui::VKEY_TAB; + if (chr == "escape") return ui::VKEY_ESCAPE; + if (chr == "control") return ui::VKEY_CONTROL; + if (chr == "alt") return ui::VKEY_MENU; + if (chr == "shift") return ui::VKEY_SHIFT; + if (chr == "end") return ui::VKEY_END; + if (chr == "home") return ui::VKEY_HOME; + if (chr == "insert") return ui::VKEY_INSERT; + if (chr == "left") return ui::VKEY_LEFT; + if (chr == "up") return ui::VKEY_UP; + if (chr == "right") return ui::VKEY_RIGHT; + if (chr == "down") return ui::VKEY_DOWN; + if (chr == "pageup") return ui::VKEY_PRIOR; + if (chr == "pagedown") return ui::VKEY_NEXT; + if (chr == "printscreen") return ui::VKEY_SNAPSHOT; + + return ui::VKEY_UNKNOWN; +} + } // namespace atom diff --git a/atom/common/keyboad_util.h b/atom/common/keyboad_util.h index 0496886e40bd..78e8021547d9 100644 --- a/atom/common/keyboad_util.h +++ b/atom/common/keyboad_util.h @@ -5,13 +5,18 @@ #ifndef ATOM_COMMON_KEYBOAD_UTIL_H_ #define ATOM_COMMON_KEYBOAD_UTIL_H_ +#include #include "ui/events/keycodes/keyboard_codes.h" +#include "base/strings/string_util.h" namespace atom { // Return key code of the char, and also determine whether the SHIFT key is // pressed. -ui::KeyboardCode KeyboardCodeFromCharCode(char c, bool* shifted); +ui::KeyboardCode KeyboardCodeFromCharCode(base::char16 c, bool* shifted); + +// Return key code of the char from a string representation of the char +ui::KeyboardCode KeyboardCodeFromKeyIdentifier(std::string chr); } // namespace atom diff --git a/atom/common/native_mate_converters/blink_converter.cc b/atom/common/native_mate_converters/blink_converter.cc index fcfc8905b3e2..e82b656e26ea 100644 --- a/atom/common/native_mate_converters/blink_converter.cc +++ b/atom/common/native_mate_converters/blink_converter.cc @@ -159,10 +159,17 @@ bool Converter::FromV8( if (!ConvertFromV8(isolate, val, static_cast(out))) return false; base::char16 code; - if (!dict.Get("keyCode", &code)) - return false; + std::string identifier; bool shifted = false; - out->windowsKeyCode = atom::KeyboardCodeFromCharCode(code, &shifted); + + if (dict.Get("keyCode", &code)) + out->windowsKeyCode = atom::KeyboardCodeFromCharCode(code, &shifted); + else if (dict.Get("keyIdentifier", &identifier)) + out->windowsKeyCode = atom::KeyboardCodeFromKeyIdentifier( + base::StringToLowerASCII(identifier)); + else + return false; + if (shifted) out->modifiers |= blink::WebInputEvent::ShiftKey; out->setKeyIdentifierFromWindowsKeyCode(); From 5fff06d2c29c9b1ecf3b169033c472895e03de45 Mon Sep 17 00:00:00 2001 From: Heilig Benedek Date: Mon, 16 Nov 2015 04:22:37 +0100 Subject: [PATCH 06/11] Added documentation for the changes in KeyboardEvent and added missing mouseMove event type --- docs/api/web-contents.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/api/web-contents.md b/docs/api/web-contents.md index 917e0670590c..50d39ac91784 100644 --- a/docs/api/web-contents.md +++ b/docs/api/web-contents.md @@ -584,7 +584,7 @@ Disable device emulation enabled by `webContents.enableDeviceEmulation`. * `event` Object * `type` String (**required**) - The type of the event, can be `mouseDown`, `mouseUp`, `mouseEnter`, `mouseLeave`, `contextMenu`, `mouseWheel`, - `keyDown`, `keyUp`, `char`. + `mouseMove`, `keyDown`, `keyUp`, `char`. * `modifiers` Array - An array of modifiers of the event, can include `shift`, `control`, `alt`, `meta`, `isKeypad`, `isAutoRepeat`, `leftButtonDown`, `middleButtonDown`, `rightButtonDown`, `capsLock`, @@ -593,9 +593,14 @@ Disable device emulation enabled by `webContents.enableDeviceEmulation`. Sends an input `event` to the page. For keyboard events, the `event` object also have following properties: +(only one of `keyCode` and `keyIdentifier` is required) -* `keyCode` String (**required**) - A single character that will be sent as +* `keyCode` Char (**required**) - A single character that will be sent as keyboard event. Can be any UTF-8 character. +* `keyIdentifier` String (**required**) - A text representation of the character + that will be sent as keyboard event, can be `Enter`, `Backspace`, `Delete`, + `Tab`, `Escape`, `Control`, `Alt`, `Shift`, `End`, `Home`, `Insert`, `Left`, + `Up`, `Right`, `Down`, `PageUp`, `PageDown`, `PrintScreen` For mouse events, the `event` object also have following properties: From c27c7b05fe3d7dbf18471444efd340d2f265335e Mon Sep 17 00:00:00 2001 From: Sunny Date: Mon, 16 Nov 2015 13:06:14 +0800 Subject: [PATCH 07/11] Add Simplified Chinese translation for source code structure --- docs-translations/zh-CN/README.md | 2 +- .../source-code-directory-structure.md | 53 +++++++++++++++++++ 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 docs-translations/zh-CN/development/source-code-directory-structure.md diff --git a/docs-translations/zh-CN/README.md b/docs-translations/zh-CN/README.md index 6085cbfb2c65..5c4303a0a6f8 100644 --- a/docs-translations/zh-CN/README.md +++ b/docs-translations/zh-CN/README.md @@ -62,7 +62,7 @@ ## 开发 * [编码规范](development/coding-style.md) -* [源码文件结构](development/source-code-directory-structure.md) +* [源码目录结构](development/source-code-directory-structure.md) * [与 NW.js (原名 node-webkit) 在技术上的差异](development/atom-shell-vs-node-webkit.md) * [构建系统概况](development/build-system-overview.md) * [构建步骤 (Mac)](development/build-instructions-mac.md) diff --git a/docs-translations/zh-CN/development/source-code-directory-structure.md b/docs-translations/zh-CN/development/source-code-directory-structure.md new file mode 100644 index 000000000000..fd3676c2e988 --- /dev/null +++ b/docs-translations/zh-CN/development/source-code-directory-structure.md @@ -0,0 +1,53 @@ +# 源码目录结构 + +Electron 的源代码主要依据 Chromium 的拆分约定被拆成了许多部分。 + +为了更好地理解源代码,您可能需要了解一下 +[Chromium 的多进程架构](http://dev.chromium.org/developers/design-documents/multi-process-architecture)。 + +## 源代码的结构 + +``` +Electron +├──atom - Electron 的源代码 +| ├── app - 系统入口代码 +| ├── browser - 包含了主窗口、UI 和其他所有与主进程有关的东西,它会告诉渲染进程如何管理页面 +| |   ├── lib - 主进程初始化代码中 JavaScript 部分的代码 +| | ├── ui - 不同平台上 UI 部分的实现 +| | | ├── cocoa - Cocoa 部分的源代码 +| | | ├── gtk - GTK+ 部分的源代码 +| | | └── win - Windows GUI 部分的源代码 +| | ├── default_app - 在没有指定 app 的情况下 Electron 启动时默认显示的页面 +| | ├── api - 主进程 API 的实现 +| | | └── lib - API 实现中 Javascript 部分的代码 +| | ├── net - 网络相关的代码 +| | ├── mac - 与 Mac 有关的 Objective-C 代码 +| | └── resources - 图标,平台相关的文件等 +| ├── renderer - 运行在渲染进程中的代码 +| | ├── lib - 渲染进程初始化代码中 JavaScript 部分的代码 +| | └── api - 渲染进程 API 的实现 +| | └── lib - API 实现中 Javascript 部分的代码 +| └── common - 同时被主进程和渲染进程用到的代码,包括了一些用来将 node 的事件循环 +| | 整合到 Chromium 的事件循环中时用到的工具函数和代码 +| ├── lib - 同时被主进程和渲染进程使用到的 Javascript 初始化代码 +| └── api - 同时被主进程和渲染进程使用到的 API 的实现以及 Electron 内置模块的基础设施 +| └── lib - API 实现中 Javascript 部分的代码 +├── chromium_src - 从 Chromium 项目中拷贝来的代码 +├── docs - 英语版本的文档 +├── docs-translations - 各种语言版本的文档翻译 +├── spec - 自动化测试 +├── atom.gyp - Electron 的构建规则 +└── common.gypi - 为诸如 `node` 和 `breakpad` 等其他组件准备的编译设置和构建规则 +``` + +## 其他目录的结构 + +* **script** - 用于诸如构建、打包、测试等开发用途的脚本 +* **tools** - 在 gyp 文件中用到的工具脚本,但与 `script` 目录不同, + 该目录中的脚本不应该被用户直接调用 +* **vendor** - 第三方依赖项的源代码,为了防止人们将它与 Chromium 源码中的同名目录相混淆, + 在这里我们不使用 `third_party` 作为目录名 +* **node_modules** - 在构建中用到的第三方 node 模块 +* **out** - `ninja` 的临时输出目录 +* **dist** - 由脚本 `script/create-dist.py` 创建的临时发布目录 +* **external_binaries** - 下载的不支持通过 `gyp` 构建的预编译第三方框架 From 3f0f1a2ce989b46b5fca8e18f70f6063e973cb07 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Mon, 16 Nov 2015 16:13:11 +0800 Subject: [PATCH 08/11] Update brightray --- vendor/brightray | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/brightray b/vendor/brightray index 10ea3c5207dc..a6e35dc2fc8c 160000 --- a/vendor/brightray +++ b/vendor/brightray @@ -1 +1 @@ -Subproject commit 10ea3c5207dc18b3103aaf6e457193f8454becf1 +Subproject commit a6e35dc2fc8c8ac9a7eb1528035b7221f2ebd092 From 728a5db3b46e62d0b37b47570ff7b57c231b146a Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Mon, 16 Nov 2015 16:47:51 +0800 Subject: [PATCH 09/11] Update brightray: fix building on Windows --- vendor/brightray | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/brightray b/vendor/brightray index a6e35dc2fc8c..d788bdfe0bcd 160000 --- a/vendor/brightray +++ b/vendor/brightray @@ -1 +1 @@ -Subproject commit a6e35dc2fc8c8ac9a7eb1528035b7221f2ebd092 +Subproject commit d788bdfe0bcd4672e62ed0e777876e76897e4613 From 9e70d35afa2e0a6bbe383212351f4b3e0a00f8f2 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Mon, 16 Nov 2015 16:48:51 +0800 Subject: [PATCH 10/11] Bump v0.35.0 --- atom.gyp | 2 +- atom/browser/resources/mac/Info.plist | 4 ++-- atom/browser/resources/win/atom.rc | 8 ++++---- atom/common/atom_version.h | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/atom.gyp b/atom.gyp index a57b7dbf58f8..2e8db6e59d10 100644 --- a/atom.gyp +++ b/atom.gyp @@ -4,7 +4,7 @@ 'product_name%': 'Electron', 'company_name%': 'GitHub, Inc', 'company_abbr%': 'github', - 'version%': '0.34.3', + 'version%': '0.35.0', }, 'includes': [ 'filenames.gypi', diff --git a/atom/browser/resources/mac/Info.plist b/atom/browser/resources/mac/Info.plist index a7df1a582e08..33f66581cbc9 100644 --- a/atom/browser/resources/mac/Info.plist +++ b/atom/browser/resources/mac/Info.plist @@ -17,9 +17,9 @@ CFBundleIconFile atom.icns CFBundleVersion - 0.34.3 + 0.35.0 CFBundleShortVersionString - 0.34.3 + 0.35.0 LSApplicationCategoryType public.app-category.developer-tools LSMinimumSystemVersion diff --git a/atom/browser/resources/win/atom.rc b/atom/browser/resources/win/atom.rc index d3ebfaa8e0d9..84f5522231ed 100644 --- a/atom/browser/resources/win/atom.rc +++ b/atom/browser/resources/win/atom.rc @@ -56,8 +56,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,34,3,0 - PRODUCTVERSION 0,34,3,0 + FILEVERSION 0,35,0,0 + PRODUCTVERSION 0,35,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -74,12 +74,12 @@ BEGIN BEGIN VALUE "CompanyName", "GitHub, Inc." VALUE "FileDescription", "Electron" - VALUE "FileVersion", "0.34.3" + VALUE "FileVersion", "0.35.0" VALUE "InternalName", "electron.exe" VALUE "LegalCopyright", "Copyright (C) 2015 GitHub, Inc. All rights reserved." VALUE "OriginalFilename", "electron.exe" VALUE "ProductName", "Electron" - VALUE "ProductVersion", "0.34.3" + VALUE "ProductVersion", "0.35.0" VALUE "SquirrelAwareVersion", "1" END END diff --git a/atom/common/atom_version.h b/atom/common/atom_version.h index b879da3066d4..ec2c81951fe3 100644 --- a/atom/common/atom_version.h +++ b/atom/common/atom_version.h @@ -6,8 +6,8 @@ #define ATOM_VERSION_H #define ATOM_MAJOR_VERSION 0 -#define ATOM_MINOR_VERSION 34 -#define ATOM_PATCH_VERSION 3 +#define ATOM_MINOR_VERSION 35 +#define ATOM_PATCH_VERSION 0 #define ATOM_VERSION_IS_RELEASE 1 From 14740eeb8a82ace268bc105e84d25f53e1b73d52 Mon Sep 17 00:00:00 2001 From: Heilig Benedek Date: Mon, 16 Nov 2015 14:51:26 +0100 Subject: [PATCH 11/11] Merging keyCode and keyIdentifier and adjusting the docs accordingly --- atom/common/keyboad_util.cc | 2 +- atom/common/keyboad_util.h | 2 +- .../common/native_mate_converters/blink_converter.cc | 2 +- docs/api/web-contents.md | 12 +++++------- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/atom/common/keyboad_util.cc b/atom/common/keyboad_util.cc index 942637786198..7d7c5d99fabe 100644 --- a/atom/common/keyboad_util.cc +++ b/atom/common/keyboad_util.cc @@ -73,7 +73,7 @@ ui::KeyboardCode KeyboardCodeFromCharCode(base::char16 c, bool* shifted) { } // Return key code of the char. -ui::KeyboardCode KeyboardCodeFromKeyIdentifier(std::string chr) { +ui::KeyboardCode KeyboardCodeFromKeyIdentifier(const std::string& chr) { if (chr == "enter") return ui::VKEY_RETURN; if (chr == "backspace") return ui::VKEY_BACK; if (chr == "delete") return ui::VKEY_DELETE; diff --git a/atom/common/keyboad_util.h b/atom/common/keyboad_util.h index 78e8021547d9..4a85c190635d 100644 --- a/atom/common/keyboad_util.h +++ b/atom/common/keyboad_util.h @@ -16,7 +16,7 @@ namespace atom { ui::KeyboardCode KeyboardCodeFromCharCode(base::char16 c, bool* shifted); // Return key code of the char from a string representation of the char -ui::KeyboardCode KeyboardCodeFromKeyIdentifier(std::string chr); +ui::KeyboardCode KeyboardCodeFromKeyIdentifier(const std::string& chr); } // namespace atom diff --git a/atom/common/native_mate_converters/blink_converter.cc b/atom/common/native_mate_converters/blink_converter.cc index e82b656e26ea..2c871276ba26 100644 --- a/atom/common/native_mate_converters/blink_converter.cc +++ b/atom/common/native_mate_converters/blink_converter.cc @@ -164,7 +164,7 @@ bool Converter::FromV8( if (dict.Get("keyCode", &code)) out->windowsKeyCode = atom::KeyboardCodeFromCharCode(code, &shifted); - else if (dict.Get("keyIdentifier", &identifier)) + else if (dict.Get("keyCode", &identifier)) out->windowsKeyCode = atom::KeyboardCodeFromKeyIdentifier( base::StringToLowerASCII(identifier)); else diff --git a/docs/api/web-contents.md b/docs/api/web-contents.md index 50d39ac91784..6acfae5c03be 100644 --- a/docs/api/web-contents.md +++ b/docs/api/web-contents.md @@ -593,14 +593,12 @@ Disable device emulation enabled by `webContents.enableDeviceEmulation`. Sends an input `event` to the page. For keyboard events, the `event` object also have following properties: -(only one of `keyCode` and `keyIdentifier` is required) -* `keyCode` Char (**required**) - A single character that will be sent as - keyboard event. Can be any UTF-8 character. -* `keyIdentifier` String (**required**) - A text representation of the character - that will be sent as keyboard event, can be `Enter`, `Backspace`, `Delete`, - `Tab`, `Escape`, `Control`, `Alt`, `Shift`, `End`, `Home`, `Insert`, `Left`, - `Up`, `Right`, `Down`, `PageUp`, `PageDown`, `PrintScreen` +* `keyCode` Char or String (**required**) - The character that will be sent + as the keyboard event. Can be a single UTF-8 character, or the name of the + key that generates the event. Accepted key names are `enter`, `backspace`, + `delete`, `tab`, `escape`, `control`, `alt`, `shift`, `end`, `home`, `insert`, + `left`, `up`, `right`, `down`, `pageUp`, `pageDown`, `printScreen` For mouse events, the `event` object also have following properties: