<script type="text/javascript" src="http://localhost:8082/console.io.js"></script>
<script>
// not work
console.log(123456)
$(function() {
// this works
console.log(456789)
})
</script>
EventEmitter.prototype.emit = function (name) {
if (!this.$events) {
// Just return will lose events. using setTimeout or queue to ensure the event truly emitted
var _this = this;
var _arguments = arguments;
setTimeout(function() {
EventEmitter.prototype.emit.apply(_this, [].slice.call(_arguments));
}, 10);
return false;
}
}