{"publisher":"WESWOO","measured_on":"2026-11-24","id":"series-tabs","url":"https://www.weswoo.com/guides/modules/home/?module=series-tabs#series-tabs","runtime":"Chrome 157.0.8103.79","method":{"zh":"WESWOO 在独立 Chrome 中运行本条目的公开脚本，按下述条件提供最小页面与样例记录。","en":"WESWOO ran this entry’s published script in standalone Chrome with the fixture markup and records described here."},"action":{"zh":"在两个系列中从第一项获得焦点，分别按 Home 和 End。读取“可见面板 / 获得焦点的链接”。","en":"With two collections, focus the first and send Home or End. Read visible panel / focused link."},"source_file":"assets/ww-series-tabs.js","source_sha256":"4868fe309927b89a6fa11d3335e1f0a0f24d459d0f9ac347223d732beb80f653","fixture_html":"<nav data-ww-series-controls><a data-ww-series-tab href=\"#p1\">A</a><a data-ww-series-tab href=\"#p2\">B</a></nav><section id=p1>A</section><section id=p2>B</section>","readings":["p1 / #p1","p2 / #p2"],"replay_function":"async function compare({id,code,dep,fixture,variant}){\n const blob=code=>URL.createObjectURL(new Blob([code],{type:'text/javascript'})),d=blob(dep),url=blob(code.replace(\"'./ww-dialog-controller.js'\",JSON.stringify(d))),m=await import(url);\n const root=document.querySelector('main');root.innerHTML=fixture;\n const el=s=>root.querySelector(s),wait=ms=>new Promise(r=>setTimeout(r,ms));let result;\n switch(id){\n case 'series-tabs':m.bindSeriesTabs(root);el('a').focus();el('a').dispatchEvent(new KeyboardEvent('keydown',{key:variant?'End':'Home',bubbles:true}));result=root.querySelector('[role=tabpanel]:not([hidden])').id+' / '+document.activeElement.hash;break;\n\n }\n URL.revokeObjectURL(url);URL.revokeObjectURL(d);return result;\n}","usage":"Open a fresh page with a main element. Run variant=false, then true in a new page. Width is 1100 px except mobile-filter-drawer with variant=true (390 px). Height 700 px. Use https://example.invalid/collection, adding ?filter.v.option.color=blue&sort_by=price&page=2 for variant=true. Pass code from source_file and dep from assets/ww-dialog-controller.js. No shop endpoint is called."}