如果spooky.then函数中有任何国际字符,SpookyJS会挂起。
try {
var Spooky = require('spooky');
} catch (e) {
var Spooky = require('../lib/spooky');
}
var spooky = new Spooky({
child: {
transport: 'http'
},
casper: {
logLevel: 'debug',
verbose: true
}
}, function (err) {
if (err) {
e = new Error('Failed to initialize SpookyJS');
e.details = err;
throw e;
}
spooky.start('http://en.wikipedia.org/wiki/Spooky_the_Tuff_Little_Ghost');
spooky.then(function () {
// 안녕
this.emit('hello', 'Hello World');
});
spooky.run();
});
spooky.on('hello', function (greeting) {
console.log(greeting);
});
spooky.on('console', function (line) {
console.log(line);
});
此问题是否有解决方法?