@micro-zoe/micro-app 1.0.0-rc.12 → 1.0.0-rc.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.esm.js +13 -4
- package/lib/index.esm.js.map +1 -1
- package/lib/index.min.js +1 -1
- package/lib/index.min.js.map +1 -1
- package/lib/index.umd.js +1 -1
- package/lib/index.umd.js.map +1 -1
- package/package.json +1 -1
package/lib/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const version = '1.0.0-rc.
|
|
1
|
+
const version = '1.0.0-rc.13';
|
|
2
2
|
// do not use isUndefined
|
|
3
3
|
const isBrowser = typeof window !== 'undefined';
|
|
4
4
|
// do not use isUndefined
|
|
@@ -3010,6 +3010,9 @@ function updateElementInfo(node, appName) {
|
|
|
3010
3010
|
return this.getAttribute('href');
|
|
3011
3011
|
},
|
|
3012
3012
|
set(value) {
|
|
3013
|
+
if (value === undefined) {
|
|
3014
|
+
return;
|
|
3015
|
+
}
|
|
3013
3016
|
this.setAttribute('href', value);
|
|
3014
3017
|
},
|
|
3015
3018
|
};
|
|
@@ -5486,8 +5489,10 @@ function patchRouter(appName, url, microAppWindow, browserHost) {
|
|
|
5486
5489
|
return createMicroLocation(appName, url, microAppWindow, childStaticLocation, browserHost, childHost);
|
|
5487
5490
|
}
|
|
5488
5491
|
|
|
5492
|
+
const UN_PROXY_INSTANCEOF_KEYS = [
|
|
5493
|
+
'Array'
|
|
5494
|
+
];
|
|
5489
5495
|
const escape2RawWindowKeys = [
|
|
5490
|
-
'Array',
|
|
5491
5496
|
'getComputedStyle',
|
|
5492
5497
|
// FIX ISSUE: https://github.com/micro-zoe/micro-app/issues/1292
|
|
5493
5498
|
'DOMParser',
|
|
@@ -5692,7 +5697,7 @@ function patchWindowProperty$1(appName, microAppWindow, sandbox) {
|
|
|
5692
5697
|
* 4. native url instanceof iframe window.URL
|
|
5693
5698
|
* ...
|
|
5694
5699
|
*/
|
|
5695
|
-
if (isConstructor(microAppWindow[key]) && key in rawWindow) {
|
|
5700
|
+
if (isConstructor(microAppWindow[key]) && key in rawWindow && !UN_PROXY_INSTANCEOF_KEYS.includes(key)) {
|
|
5696
5701
|
rawDefineProperty(microAppWindow[key], Symbol.hasInstance, {
|
|
5697
5702
|
configurable: true,
|
|
5698
5703
|
enumerable: false,
|
|
@@ -6455,7 +6460,11 @@ function patchIframeAttribute(url, microAppWindow) {
|
|
|
6455
6460
|
else {
|
|
6456
6461
|
if (((key === 'src' || key === 'srcset') && /^(img|script|video|audio|source|embed)$/i.test(this.tagName)) ||
|
|
6457
6462
|
(key === 'href' && /^(a|link|image)$/i.test(this.tagName))) {
|
|
6458
|
-
|
|
6463
|
+
let _url = url;
|
|
6464
|
+
if (isBrowser && key === 'href' && /^a$/i.test(this.tagName) && isFunction(microApp.options.excludeAssetFilter) && microApp.options.excludeAssetFilter(value)) {
|
|
6465
|
+
_url = document.baseURI;
|
|
6466
|
+
}
|
|
6467
|
+
value = CompletionPath(value, _url);
|
|
6459
6468
|
}
|
|
6460
6469
|
rawMicroSetAttribute.call(this, key, value);
|
|
6461
6470
|
}
|