MCPcopy Create free account
hub / github.com/ampproject/amphtml / isOpera

Function isOpera

src/preact/utils/platform.js:57–62  ·  view source on GitHub ↗

* Whether the current browser is an Opera browser. * @return {boolean}

()

Source from the content-addressed store, hash-verified

55 * @return {boolean}
56 */
57 isOpera() {
58 // Chrome UA on Android may include OPR<v> (build code referring to Oreo),
59 // however real Opera puts put a / after OPR and that's the only tell, so
60 // we check for OPR/ instead of OPR
61 return /OPR\/|Opera|OPiOS/i.test(self.navigator.userAgent);
62 },
63
64 /**
65 * Whether the current browser is an Edge browser.

Callers

nothing calls this directly

Calls 1

testMethod · 0.45

Tested by

no test coverage detected