@xh/hoist 56.4.0 → 56.4.1
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/CHANGELOG.md +8 -0
- package/package.json +1 -1
- package/static/preflight.js +15 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v56.4.1 - 2024-04-25
|
|
4
|
+
|
|
5
|
+
### 🐞 Bug Fixes
|
|
6
|
+
|
|
7
|
+
* Fixed over-eager error handler installed on window during preflight app initialization. This can
|
|
8
|
+
catch errors thrown by browser extensions unrelated to the app itself, which should not block
|
|
9
|
+
startup. Make opt-in via special query param `catchPreflightError=true`.
|
|
10
|
+
|
|
3
11
|
## v56.4.0 - 2023-05-10
|
|
4
12
|
|
|
5
13
|
### 🎁 New Features
|
package/package.json
CHANGED
package/static/preflight.js
CHANGED
|
@@ -21,18 +21,20 @@ window._xhLoadTimestamp = Date.now();
|
|
|
21
21
|
}
|
|
22
22
|
})(window);
|
|
23
23
|
|
|
24
|
-
//
|
|
25
|
-
window.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
// Use flag below to catch and stop on errors that occur before in-app exception handling active.
|
|
25
|
+
if (window.location.search.toLowerCase().indexOf('catchpreflighterror=true') != -1) {
|
|
26
|
+
window.onerror = function (errorMsg, url, line, col, error) {
|
|
27
|
+
document.body.innerHTML = (
|
|
28
|
+
'<div style="margin: 60px auto; font-family: sans-serif; width: 450px; max-width: 80%; text-align: center; padding: 20px; border: 1px solid #ccc;">' +
|
|
29
|
+
'<strong>This application can not be loaded in your current browser</strong><br/><br/>' +
|
|
29
30
|
'<div style="text-align: left">' +
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
errorMsg + '<br/>' +
|
|
32
|
+
'<div style="padding-left: 3em; overflow-wrap: anywhere;">' +
|
|
33
|
+
'at ' + url + ':' + line + ':' + col +
|
|
34
|
+
'</div>' + '<br/><br/>' +
|
|
35
|
+
window.navigator.userAgent +
|
|
35
36
|
'</div>' +
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
};
|
|
37
|
+
'</div>'
|
|
38
|
+
);
|
|
39
|
+
};
|
|
40
|
+
}
|