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:
Mohit Singh 2019-12-19 10:40:55 +00:00
Родитель 8d46e6df84
Коммит d7b28ea9a2
3 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -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);
}