1.4.6 • Published 6 months ago
chobitsu v1.4.6
chobitsu
Chrome devtools protocol JavaScript implementation.
Install
You can get it on npm.
npm install chobitsu --save
Usage
const chobitsu = require('chobitsu');
chobitsu.setOnMessage(message => {
console.log(message);
});
chobitsu.sendRawMessage(JSON.stringify({
id: 1,
method: 'DOMStorage.clear',
params: {
storageId: {
isLocalStorage: true,
securityOrigin: 'http://example.com'
}
}
}));
!(async () => {
console.log(await chobitsu.sendMessage('Storage.clearDataForOrigin', {
storageTypes: 'local_storage'
}));
})();
const domStorage = chobitsu.domain('DOMStorage');
domStorage.enable();
domStorage.on('domStorageItemUpdated', params => console.log(params));
API
sendRawMessage(message: string)
Send message to chobitsu.
setOnMessage(onMessage: (message: string) => void)
Set message handler.
sendMessage(method: string, params: any): Promise
Send message without setting id and get result.
domain(name: string)
Get domain object.
Related Projects
- chii: Remote debugging tool.
1.4.6
6 months ago
1.4.5
1 year ago
1.4.4
1 year ago
1.4.3
1 year ago
1.4.2
1 year ago
1.4.1
1 year ago
1.4.0
1 year ago
1.3.1
1 year ago
1.2.0
2 years ago
1.1.1
2 years ago
1.1.0
2 years ago
1.0.1
2 years ago
1.0.0
2 years ago
1.3.0
2 years ago
1.2.1
2 years ago
0.4.0
2 years ago
0.3.2
3 years ago
0.3.3
3 years ago
0.2.2
4 years ago
0.2.1
4 years ago
0.2.0
4 years ago
0.1.0
4 years ago
0.0.1
4 years ago