我正在观察一些奇怪的事情。我有一些背景脚本,实际上很多——比如 18
....
"background": {
"scripts": [
"scripts/namespace.js",
"scripts/frameworks/honeybadger.js",
"scripts/frameworks/underscore.js",
"scripts/frameworks/mixin.js",
"scripts/frameworks/analytics.js",
"scripts/modules/worker.js",
"scripts/modules/i18n.js",
"scripts/modules/url.js",
"scripts/trackers/error_tracker.js",
"scripts/trackers/analytics_tracker.js",
"scripts/lib/page_context_menu.js",
"scripts/lib/selection_context_menu.js",
"scripts/lib/omnibox.js",
"scripts/lib/sync_store.js",
"scripts/lib/local_store.js",
"scripts/lib/example_tags.js",
"scripts/persistence/tag.js",
"scripts/init/tag_feature.js",
"scripts/initialize_background.js"
],
"persistent": false
},
....
我有 HoneyBadger 错误跟踪,我看到与加载顺序相关的错误。最后一个脚本,initialize_background.js
是作为开始的地方。但是我看到如下错误:
- Uncaught ReferenceError: _ is not defined (第三个脚本加载)
- 未捕获的 ReferenceError:_qag 未定义(已加载第五个脚本)
以前有人发生过这种情况吗?可以信任脚本数组按顺序加载脚本吗?应该注意,我无法重现这一点。