chrome-remote-interface
Advanced tools
Comparing version 0.30.1 to 0.31.0
@@ -31,7 +31,8 @@ 'use strict'; | ||
function addCommand(chrome, domainName, command) { | ||
const commandName = `${domainName}.${command.name}`; | ||
const handler = (params, sessionId, callback) => { | ||
return chrome.send(`${domainName}.${command.name}`, params, sessionId, callback); | ||
return chrome.send(commandName, params, sessionId, callback); | ||
}; | ||
decorate(handler, 'command', command); | ||
chrome[domainName][command.name] = handler; | ||
chrome[commandName] = chrome[domainName][command.name] = handler; | ||
} | ||
@@ -57,9 +58,10 @@ | ||
decorate(handler, 'event', event); | ||
chrome[domainName][event.name] = handler; | ||
chrome[eventName] = chrome[domainName][event.name] = handler; | ||
} | ||
function addType(chrome, domainName, type) { | ||
const typeName = `${domainName}.${type.id}`; | ||
const help = {}; | ||
decorate(help, 'type', type); | ||
chrome[domainName][type.id] = help; | ||
chrome[typeName] = chrome[domainName][type.id] = help; | ||
} | ||
@@ -66,0 +68,0 @@ |
@@ -18,3 +18,3 @@ { | ||
"homepage": "https://github.com/cyrus-and/chrome-remote-interface", | ||
"version": "0.30.1", | ||
"version": "0.31.0", | ||
"repository": { | ||
@@ -21,0 +21,0 @@ "type": "git", |
# chrome-remote-interface [![Build Status][]][travis] | ||
[Build Status]: https://travis-ci.org/cyrus-and/chrome-remote-interface.svg?branch=master | ||
[travis]: https://travis-ci.org/cyrus-and/chrome-remote-interface | ||
[Build Status]: https://travis-ci.com/cyrus-and/chrome-remote-interface.svg?branch=master | ||
[travis]: https://travis-ci.com/cyrus-and/chrome-remote-interface | ||
@@ -869,2 +869,12 @@ [Chrome Debugging Protocol] interface that helps to instrument Chrome (or any | ||
#### client['`<domain>`.`<name>`'] | ||
Just a shorthand for: | ||
```js | ||
client.<domain>.<name> | ||
``` | ||
Where `<name>` can be a command, an event, or a type. | ||
## FAQ | ||
@@ -871,0 +881,0 @@ |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1378161
19403
960