Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • 987FCF504483CBC8/toolkit
1 result
Show changes
Commits on Source (5)
...@@ -166,9 +166,10 @@ export class AuthKeycloak extends AdapterLitElement { ...@@ -166,9 +166,10 @@ export class AuthKeycloak extends AdapterLitElement {
person: this._user, person: this._user,
}; };
// inject a window.DBPAuth variable for cypress // inject a window.DBPAuth variable for Cypress/Playwright
if (window.Cypress) { if (window.Cypress || window.playwright) {
window.DBPAuth = auth; window.DBPAuth = auth;
console.log("Cypress/Playwright detected");
} }
this.sendSetPropertyEvent('auth', auth); this.sendSetPropertyEvent('auth', auth);
......
...@@ -82,6 +82,18 @@ Example usage: ...@@ -82,6 +82,18 @@ Example usage:
return !!window.AbortController && Request.prototype.hasOwnProperty('signal'); return !!window.AbortController && Request.prototype.hasOwnProperty('signal');
} }
// check for safari 13.1+ and safari on iOS 13.4+
// https://caniuse.com/resizeobserver
function supportsResizeObserver() {
try {
eval('new ResizeObserver(items => {})');
} catch (e) {
return false;
}
return true;
}
function isBrowserSupported() { function isBrowserSupported() {
if (!supportsEval()) { if (!supportsEval()) {
console.log('Eval support disabled, skipping browser feature detection.'); console.log('Eval support disabled, skipping browser feature detection.');
...@@ -123,6 +135,11 @@ Example usage: ...@@ -123,6 +135,11 @@ Example usage:
return false; return false;
} }
if (!supportsResizeObserver()) {
console.log('ResizeObserver not supported');
return false;
}
return true; return true;
} }
......
This diff is collapsed.