Merge pull request #8279 from hashicorp/b-ui/remove-safari-special-case
UI: Fix monitor in Safari
This commit is contained in:
commit
683a4c81ac
|
@ -89,16 +89,5 @@ export default class StreamLogger extends EmberObject.extend(AbstractLogger) {
|
|||
}
|
||||
|
||||
StreamLogger.reopenClass({
|
||||
isSupported: !!window.ReadableStream && !isSafari(),
|
||||
isSupported: !!window.ReadableStream,
|
||||
});
|
||||
|
||||
// Fetch streaming doesn't work in Safari yet despite all the primitives being in place.
|
||||
// Bug: https://bugs.webkit.org/show_bug.cgi?id=185924
|
||||
// Until this is fixed, Safari needs to be explicitly targeted for poll-based logging.
|
||||
function isSafari() {
|
||||
const oldSafariTest = /constructor/i.test(window.HTMLElement);
|
||||
const newSafariTest = (function(p) {
|
||||
return p.toString() === '[object SafariRemoteNotification]';
|
||||
})(!window['safari'] || (typeof window.safari !== 'undefined' && window.safari.pushNotification));
|
||||
return oldSafariTest || newSafariTest;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue