12345678910111213141516171819 |
- const {console} = require('zombie/zombie');
- const {closeAll, openPrivateWindow} = require('zombie/webbrowser');
- require('zombie/async').run(function* () {
- // Private browsing
- let window = yield openPrivateWindow('https://en.wikipedia.org/');
- console.log(window.uri);
-
- // Examine cookies
- let cookies = yield window.runScript(message => {
- alert(message);
- return document.cookie;
- }, 'Hello, world!');
-
- console.log(cookies);
- closeAll();
- });
- // vim: ts=4 noet ai
|