зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1601037 - initialized option parameter present in 3 methods to default {} r=remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D57745 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
8d46e6df84
Коммит
d7b28ea9a2
|
@ -198,7 +198,7 @@ class Page extends ContentProcessDomain {
|
|||
* @param {boolean} options.enabled
|
||||
* If true, starts emitting lifecycle events.
|
||||
*/
|
||||
setLifecycleEventsEnabled(options) {
|
||||
setLifecycleEventsEnabled(options = {}) {
|
||||
const { enabled } = options;
|
||||
|
||||
this.lifecycleEnabled = enabled;
|
||||
|
|
|
@ -33,7 +33,7 @@ class Input extends Domain {
|
|||
* - keyIdentifier (not supported)
|
||||
* - isSystemKey (not supported)
|
||||
*/
|
||||
async dispatchKeyEvent(options) {
|
||||
async dispatchKeyEvent(options = {}) {
|
||||
// missing code, text, unmodifiedText, autorepeat, location, iskeypad
|
||||
const { key, modifiers, type, windowsVirtualKeyCode } = options;
|
||||
const { alt, ctrl, meta, shift } = Input.Modifier;
|
||||
|
|
|
@ -80,7 +80,7 @@ class Network extends Domain {
|
|||
*
|
||||
* Redirected to Emulation.setUserAgentOverride.
|
||||
*/
|
||||
setUserAgentOverride(options) {
|
||||
setUserAgentOverride(options = {}) {
|
||||
const { id } = this.session;
|
||||
this.session.execute(id, "Emulation", "setUserAgentOverride", options);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче