Remove special-casing of Safari to force use of a PollLogger

This commit is contained in:
Michael Lange 2020-06-24 20:30:52 -07:00
parent b234b1cefd
commit 3182adeefa

View file

@ -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;
}