Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add better polyfills / auto polyfill opera + opera mini #843

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add opera mini check
silesky committed Apr 21, 2023
commit 26efac584f5196172a8b7a624d7252936c994ace
6 changes: 3 additions & 3 deletions packages/browser/src/lib/browser-polyfill.ts
Original file line number Diff line number Diff line change
@@ -4,6 +4,8 @@ export function shouldPolyfill(): boolean {
Edge: 13,
}

const isOperaMiniExtremeMode = (window as any).operamini // compression proxy - allows for page() calls.

// Unfortunately IE doesn't follow the same pattern as other browsers, so we
// need to check `isIE11` differently.
// @ts-expect-error
@@ -14,10 +16,8 @@ export function shouldPolyfill(): boolean {

return (
isIE11 ||
isOperaMiniExtremeMode ||
(browserVersionCompatList[browser] !== undefined &&
browserVersionCompatList[browser] >= parseInt(version))
)
}

// appName = Netscape IE / Edge
// edge 13 Edge/13... same as FF