This commit is contained in:
Mirco Wittrien 2021-02-17 13:13:48 +01:00
parent 41648b2e59
commit 558221e271
2 changed files with 8 additions and 9 deletions

View File

@ -3534,7 +3534,7 @@ module.exports = (_ => {
container = container || document.head.querySelector("bd-head bd-styles") || document.head;
container = Node.prototype.isPrototypeOf(container) ? container : document.head;
BDFDB.DOMUtils.removeWebStyle(url, container);
container.appendChild(BDFDB.DOMUtils.create(`<link type="text/css" rel="Stylesheet" href="${url}"></link>`));
container.appendChild(BDFDB.DOMUtils.create(`<link type="text/css" rel="stylesheet" href="${url}"></link>`));
};
BDFDB.DOMUtils.removeWebStyle = function (url, container) {
if (typeof url != "string") return;

View File

@ -4,6 +4,7 @@
window.global = window;
let nativeRequire = window.require || (_ => {});
let nativeWebpackJsonp = window.webpackJsonp;
window.respondToParent = function (data = {}) {
if (window.parent && typeof window.parent.postMessage == "function") window.parent.postMessage(data, "*");
@ -227,13 +228,11 @@
return string;
};
window.webpackJsonp = function () {
return {
default: {
m: {},
c: {}
}
};
window.webpackJsonp = {
push: _ => ({
m: {},
c: {}
})
};
window.fetch = function () {
@ -248,7 +247,7 @@
let WebModulesFind = function (filter) {
const id = "PluginRepo-WebModules";
const req = typeof(window.webpackJsonp) == "function" ? window.webpackJsonp([], {[id]: (module, exports, req) => exports.default = req}, [id]).default : window.webpackJsonp.push([[], {[id]: (module, exports, req) => module.exports = req}, [[id]]]);
const req = nativeWebpackJsonp.push([[], {[id]: (module, exports, req) => module.exports = req}, [[id]]]);
delete req.m[id];
delete req.c[id];
for (let m in req.c) {