Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor() {
// Create a Map to link elements to observe to their resize event callbacks
this._resizeObserverMap = new Map();
this._resizeObserver = new ResizeObserver((entries) => {
for (let i = 0; i < entries.length; i++) {
const observedElement = entries[i].target;
const allCallbacks = this._resizeObserverMap.get(observedElement);
if (allCallbacks) {
for (let j = 0; j < allCallbacks.length; j++) {
allCallbacks[j].call(observedElement);
}
}
}
});
const focusableElements = FOCUSABLE_ELEMENTS.slice();
this._focusableElementsSelector = focusableElements.join(',');
focusableElements.push('[tabindex]:not([tabindex="-1"])');
this._tabbableElementsSelector = focusableElements.join(':not([tabindex="-1"]),');
constructor() {
// Create a Map to link elements to observe to their resize event callbacks
this._resizeObserverMap = new Map();
this._resizeObserver = new ResizeObserver((entries) => {
for (let i = 0; i < entries.length; i++) {
const observedElement = entries[i].target;
const allCallbacks = this._resizeObserverMap.get(observedElement);
if (allCallbacks) {
for (let j = 0; j < allCallbacks.length; j++) {
allCallbacks[j].call(observedElement);
}
}
}
});
const focusableElements = FOCUSABLE_ELEMENTS.slice();
this._focusableElementsSelector = focusableElements.join(',');
focusableElements.push('[tabindex]:not([tabindex="-1"])');
this._tabbableElementsSelector = focusableElements.join(':not([tabindex="-1"]),');