Tôi có đoạn code sau đây trong một BACKGROUND_SCRIPT trong một phần mở rộng của Google Chrome:Điều gì khiến EventSource kích hoạt lỗi trong tiện ích Chrome của tôi?
var source = new EventSource("http://www.janywer.freetzi.com/events/groupshout.php");
source.addEventListener('message', function (e) {
console.log('message', e.data);
}, false);
source.addEventListener('open', function (e) {
console.log('open');
}, false);
source.addEventListener('error', function (e) {
console.log('error')
}, false);
Vấn đề của tôi là như sau: 'lỗi' Bất cứ khi nào tôi tải các phần mở rộng, nó nói, nhưng làm thế nào để tìm hiểu chính xác những gì gây ra lỗi?