(function() {"use strict";var __module = CC_EDITOR ? module : {exports:{}};var __filename = 'preview-scripts/assets/Script/Tools/ImportCDNJS.js';var __require = CC_EDITOR ? function (request) {return cc.require(request, require);} : function (request) {return cc.require(request, __filename);};function __define (exports, require, module) {"use strict";
cc._RF.push(module, '8539btrh65NCbNgIg1eaXNU', 'ImportCDNJS', __filename);
// Script/Tools/ImportCDNJS.ts

Object.defineProperty(exports, "__esModule", { value: true });
exports.default = (function (CDNUrl, name) { return new Promise(function (resolve) {
    var dom = document.createElement('script');
    dom.src = CDNUrl;
    dom.type = 'text/javascript';
    dom.onload = function () {
        resolve(window[name]);
    };
    document.head.appendChild(dom);
}); });

cc._RF.pop();
        }
        if (CC_EDITOR) {
            __define(__module.exports, __require, __module);
        }
        else {
            cc.registerModuleFunc(__filename, function () {
                __define(__module.exports, __require, __module);
            });
        }
        })();
        //# sourceMappingURL=ImportCDNJS.js.map
        