Fixed issue with loading resources

This commit is contained in:
Shaun Walker
2020-05-16 22:11:58 -04:00
parent c426302242
commit f8ab886750
3 changed files with 9 additions and 19 deletions

View File

@ -62,10 +62,10 @@ window.interop = {
link.id = id;
}
link.rel = rel;
link.href = url;
if (type !== "") {
link.type = type;
}
link.href = url;
if (integrity !== "") {
link.integrity = integrity;
}
@ -78,9 +78,6 @@ window.interop = {
if (link.rel !== rel) {
link.setAttribute('rel', rel);
}
if (link.href !== url) {
link.setAttribute('href', url);
}
if (type !== "") {
if (link.type !== type) {
link.setAttribute('type', type);
@ -88,6 +85,11 @@ window.interop = {
} else {
link.removeAttribute('type');
}
if (link.href !== url) {
link.removeAttribute('integrity');
link.removeAttribute('crossorigin');
link.setAttribute('href', url);
}
if (integrity !== "") {
if (link.integrity !== integrity) {
link.setAttribute('integrity', integrity);
@ -136,6 +138,8 @@ window.interop = {
else {
if (src !== "") {
if (script.src !== src) {
script.removeAttribute('integrity');
script.removeAttribute('crossorigin');
script.src = src;
}
if (integrity !== "") {