PageSourceSearch

https://woodsorrelstudios.com/cdn/shop/t/18/assets/util.a11y.js?v=52391889484665157991788906318

js woodsorrelstudios.com collected 2026-10-10 01:10:08 UTC 2,847 bytes, 2 lines download raw bytes

1export function forceFocus(element,options={}){let savedTabIndex=element.tabIndex;element.tabIndex=-1,element.dataset.tabIndex=savedTabIndex,element.focus(),typeof options.className<"u"&&element.classList.add(options.className),element.addEventListener("blur",callback);function callback(event){event.target.removeEventListener(event.type,callback),element.tabIndex=savedTabIndex,delete element.dataset.tabIndex,typeof options.className<"u"&&element.classList.remove(options.className)}}export function focusable(container){return Array.from(container.querySelectorAll("summary, a[href], button:enabled, [tabindex]:not([tabindex^='-']), [draggable], area, input:not([type=hidden]):enabled, select:enabled, textarea:enabled, object, iframe"))}let trapFocusHandlers={};window.util||(window.util={}),window.util.a11y||(window.util.a11y={}),window.util.a11y.focusTrapContainer=null;export function trapFocus(container,options={}){let elements=focusable(container),elementToFocus=options.elementToFocus||container,first=elements[0],last=elements[elements.length-1];removeTrapFocus(),window.util.a11y.focusTrapContainer=container,trapFocusHandlers.focusin=function(event){container!==event.target&&!container.contains(event.target)&&forceFocus(first||container,options),!(event.target!==container&&event.target!==last&&event.target!==first)&&document.addEventListener("keydown",trapFocusHandlers.keydown)},trapFocusHandlers.focusout=function(){document.removeEventListener("keydown",trapFocusHandlers.keydown)},trapFocusHandlers.keydown=function(event){event.keyCode===9&&(event.target===last&&!event.shiftKey&&(event.preventDefault(),forceFocus(first||container,options)),(event.target===container||event.target===first)&&event.shiftKey&&(event.preventDefault(),forceFocus(last||container,options)))},document.addEventListener("focusout",trapFocusHandlers.focusout),document.addEventListener("focusin",trapFocusHandlers.focusin),forceFocus(elementToFocus,options)}export function removeTrapFocus(elementToFocus=null){if(document.removeEventListener("focusin",trapFocusHandlers.focusin),document.removeEventListener("focusout",trapFocusHandlers.focusout),document.removeEventListener("keydown",trapFocusHandlers.keydown),window.util.a11y.focusTrapContainer=null,elementToFocus)try{elementToFocus.focus({preventScroll:!0})}catch{elementToFocus.focus()}}let _handleTouchmove=()=>!0;export function lockMobileScrolling(element){let el=element||document.documentElement;document.documentElement.classList.add("lock-scroll"),el.addEventListener("touchmove",_handleTouchmove)}export function unlockMobileScrolling(element){document.documentElement.classList.remove("lock-scroll"),(element||document.documentElement).removeEventListener("touchmove",_handleTouchmove)}
2//# sourceMappingURL=/cdn/shop/t/18/assets/util.a11y.js.map?v=52391889484665157991788906318

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.