<proxy-events on="['click', 'mousemove', 'touchstart']" id="eventGroup1">
...
</proxy-events>
EventProxy.subscribe('eventGroup1', function(eventType, event) {
console.log(eventType, event);
});
require.ensure(['Test'], require => {
require('Test');
});
var Nightmare = require('nightmare');
var nightmare = Nightmare({ show: true })ж
var results = [];
nightmare
.goto('http://yahoo.com')
.type('form[action*="/search"] [name=p]', 'github nightmare')
.click('form[action*="/search"] [type=submit]')
.wait('#main')
.evaluate(function () {
return document.querySelector('#main .searchCenterMiddle li a').href;
})
.then(results.push.bind(results))
.goto('http://google.com')
.type('form[action*="/search"] [name=p]', 'github nightmare')
.click('form[action*="/search"] [type=submit]')
.wait('#main')
.evaluate(function () {
return document.querySelector('#main .searchCenterMiddle li a').href;
})
.then(results.push.bind(results))
.end()
.then(function() {
console.log(results);
})
.catch(function (error) {
console.error('Search failed:', error);
});
url('^.*$', views.homepage, name='index'),