{"ScriptPreparationCode":"const input1 = document.getElementById(\u0027input1\u0027);\r\nconst input2 = document.getElementById(\u0027input2\u0027);\r\nconst input3 = document.getElementById(\u0027input3\u0027);\r\nconst input4 = document.getElementById(\u0027input4\u0027);\r\nconst input5 = document.getElementById(\u0027input5\u0027);\r\nconst input6 = document.getElementById(\u0027input6\u0027);\r\nconst input7 = document.getElementById(\u0027input7\u0027);\r\nconst input8 = document.getElementById(\u0027input8\u0027);\r\nconst input9 = document.getElementById(\u0027input9\u0027);\r\nconst input10 = document.getElementById(\u0027input10\u0027);\r\n\r\nconst window1 = document.getElementById(\u0027window1\u0027);\r\nconst window2 = document.getElementById(\u0027window2\u0027);\r\nconst window3 = document.getElementById(\u0027window3\u0027);\r\nconst window4 = document.getElementById(\u0027window4\u0027);\r\nconst window5 = document.getElementById(\u0027window5\u0027);\r\nconst window6 = document.getElementById(\u0027window6\u0027);\r\nconst window7 = document.getElementById(\u0027window7\u0027);\r\nconst window8 = document.getElementById(\u0027window8\u0027);\r\nconst window9 = document.getElementById(\u0027window9\u0027);\r\nconst window10 = document.getElementById(\u0027window10\u0027);\r\n\r\n///// input biz\r\nconst onKeyDown = (e) =\u003E console.log({e});\r\n\r\ninput1.addEventListener(\u0027keydown\u0027, onKeyDown, false);\r\ninput2.addEventListener(\u0027keydown\u0027, onKeyDown, false);\r\ninput3.addEventListener(\u0027keydown\u0027, onKeyDown, false);\r\ninput4.addEventListener(\u0027keydown\u0027, onKeyDown, false);\r\ninput5.addEventListener(\u0027keydown\u0027, onKeyDown, false);\r\ninput6.addEventListener(\u0027keydown\u0027, onKeyDown, false);\r\ninput7.addEventListener(\u0027keydown\u0027, onKeyDown, false);\r\ninput8.addEventListener(\u0027keydown\u0027, onKeyDown, false);\r\ninput9.addEventListener(\u0027keydown\u0027, onKeyDown, false);\r\ninput10.addEventListener(\u0027keydown\u0027, onKeyDown, false);\r\n\r\n// window biz\r\nconst listener = (id) =\u003E (e) =\u003E {\r\n if (e.target.id === id) {\r\n console.log(e.target)\r\n }\r\n}\r\n\r\nwindow.addEventListener(\u0027keydown\u0027, listener(\u0027window1\u0027), false);\r\nwindow.addEventListener(\u0027keydown\u0027, listener(\u0027window2\u0027), false);\r\nwindow.addEventListener(\u0027keydown\u0027, listener(\u0027window3\u0027), false);\r\nwindow.addEventListener(\u0027keydown\u0027, listener(\u0027window4\u0027), false);\r\nwindow.addEventListener(\u0027keydown\u0027, listener(\u0027window5\u0027), false);\r\nwindow.addEventListener(\u0027keydown\u0027, listener(\u0027window6\u0027), false);\r\nwindow.addEventListener(\u0027keydown\u0027, listener(\u0027window7\u0027), false);\r\nwindow.addEventListener(\u0027keydown\u0027, listener(\u0027window8\u0027), false);\r\nwindow.addEventListener(\u0027keydown\u0027, listener(\u0027window9\u0027), false);\r\nwindow.addEventListener(\u0027keydown\u0027, listener(\u0027window10\u0027), false);","TestCases":[{"Name":"1 event listener on every input(10)","Code":"input1.dispatchEvent(new Event(\u0027focus\u0027));\r\ninput1.dispatchEvent(new KeyboardEvent(\u0027keydown\u0027,{\u0027key\u0027:\u0027a\u0027}));\r\ninput2.dispatchEvent(new Event(\u0027focus\u0027));\r\ninput2.dispatchEvent(new KeyboardEvent(\u0027keydown\u0027,{\u0027key\u0027:\u0027a\u0027}));\r\ninput3.dispatchEvent(new Event(\u0027focus\u0027));\r\ninput3.dispatchEvent(new KeyboardEvent(\u0027keydown\u0027,{\u0027key\u0027:\u0027a\u0027}));\r\ninput4.dispatchEvent(new Event(\u0027focus\u0027));\r\ninput4.dispatchEvent(new KeyboardEvent(\u0027keydown\u0027,{\u0027key\u0027:\u0027a\u0027}));\r\ninput5.dispatchEvent(new Event(\u0027focus\u0027));\r\ninput5.dispatchEvent(new KeyboardEvent(\u0027keydown\u0027,{\u0027key\u0027:\u0027a\u0027}));\r\ninput6.dispatchEvent(new Event(\u0027focus\u0027));\r\ninput6.dispatchEvent(new KeyboardEvent(\u0027keydown\u0027,{\u0027key\u0027:\u0027a\u0027}));\r\ninput7.dispatchEvent(new Event(\u0027focus\u0027));\r\ninput7.dispatchEvent(new KeyboardEvent(\u0027keydown\u0027,{\u0027key\u0027:\u0027a\u0027}));\r\ninput8.dispatchEvent(new Event(\u0027focus\u0027));\r\ninput8.dispatchEvent(new KeyboardEvent(\u0027keydown\u0027,{\u0027key\u0027:\u0027a\u0027}));\r\ninput9.dispatchEvent(new Event(\u0027focus\u0027));\r\ninput9.dispatchEvent(new KeyboardEvent(\u0027keydown\u0027,{\u0027key\u0027:\u0027a\u0027}));\r\ninput10.dispatchEvent(new Event(\u0027focus\u0027));\r\ninput10.dispatchEvent(new KeyboardEvent(\u0027keydown\u0027,{\u0027key\u0027:\u0027a\u0027}));","IsDeferred":false},{"Name":"1 window event listener for every input(10)","Code":"window1.dispatchEvent(new Event(\u0027focus\u0027));\r\nwindow1.dispatchEvent(new KeyboardEvent(\u0027keydown\u0027,{\u0027key\u0027:\u0027a\u0027}));\r\nwindow2.dispatchEvent(new Event(\u0027focus\u0027));\r\nwindow2.dispatchEvent(new KeyboardEvent(\u0027keydown\u0027,{\u0027key\u0027:\u0027a\u0027}));\r\nwindow3.dispatchEvent(new Event(\u0027focus\u0027));\r\nwindow3.dispatchEvent(new KeyboardEvent(\u0027keydown\u0027,{\u0027key\u0027:\u0027a\u0027}));\r\nwindow4.dispatchEvent(new Event(\u0027focus\u0027));\r\nwindow4.dispatchEvent(new KeyboardEvent(\u0027keydown\u0027,{\u0027key\u0027:\u0027a\u0027}));\r\nwindow5.dispatchEvent(new Event(\u0027focus\u0027));\r\nwindow5.dispatchEvent(new KeyboardEvent(\u0027keydown\u0027,{\u0027key\u0027:\u0027a\u0027}));\r\nwindow6.dispatchEvent(new Event(\u0027focus\u0027));\r\nwindow6.dispatchEvent(new KeyboardEvent(\u0027keydown\u0027,{\u0027key\u0027:\u0027a\u0027}));\r\nwindow7.dispatchEvent(new Event(\u0027focus\u0027));\r\nwindow7.dispatchEvent(new KeyboardEvent(\u0027keydown\u0027,{\u0027key\u0027:\u0027a\u0027}));\r\nwindow8.dispatchEvent(new Event(\u0027focus\u0027));\r\nwindow8.dispatchEvent(new KeyboardEvent(\u0027keydown\u0027,{\u0027key\u0027:\u0027a\u0027}));\r\nwindow9.dispatchEvent(new Event(\u0027focus\u0027));\r\nwindow9.dispatchEvent(new KeyboardEvent(\u0027keydown\u0027,{\u0027key\u0027:\u0027a\u0027}));\r\nwindow10.dispatchEvent(new Event(\u0027focus\u0027));\r\nwindow10.dispatchEvent(new KeyboardEvent(\u0027keydown\u0027,{\u0027key\u0027:\u0027a\u0027}));","IsDeferred":false}]}