jsmmth / vue-loop

Infinite content loop for Vue
820 stars 37 forks source link

Change the resize event listener technique #1

Closed daryl closed 7 years ago

daryl commented 7 years ago

You should use addEventListener for the resize event as it supports an infinite amount of listeners. The problem with onresize is that it's the inline technique and only supports one handler, which makes it easily overwritable since window is global 👍

jsmmth commented 7 years ago

Thanks for the suggestion @daryl, makes perfect sense I added it in 😀