You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
583 B
21 lines
583 B
(function (global) {
|
|
'use strict';
|
|
|
|
function startAgent() {
|
|
if (global.__PW_MODE && global.__PW_MODE !== 'game') return;
|
|
var WorkbenchAgent = global.PWAgent;
|
|
if (!WorkbenchAgent) {
|
|
console.error('[调试工作台] agent-core 未加载');
|
|
return;
|
|
}
|
|
var agent = new WorkbenchAgent();
|
|
global.__PW_Agent = agent;
|
|
agent.boot();
|
|
}
|
|
|
|
if (document.readyState === 'loading') {
|
|
document.addEventListener('DOMContentLoaded', startAgent);
|
|
} else {
|
|
startAgent();
|
|
}
|
|
})(window);
|
|
|