Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
If done with debouncing and requestAnimationFrame, there's no issue with a resize handler.
-
kdion4891515yNow compare this to adding delegate events in C#. You'll be happy to come back to JavaScript.
-
@NoToJavaScript It is a normal line of code.. but what lies in it is horror! manual sizing and positioning of elements where HTML and CSS simply cannot (or, more accurately, could not) help you. Rough times... rough times indeed.
As a web developer, I have nightmares about this line:
window.addEventListener("resize", function(e){
// ...
});
rant