RE: Element onResize and onMove events

IE had a “move” event for a long time. It was terribly inefficient for our layout engine to support and often did not deliver the kind of ‘move’ expectations that users wanted. +1 to rolling the functionality you specifically want.

From: Brian Blakely [mailto:anewpage.media@gmail.com]
Sent: Saturday, February 14, 2015 12:16 PM
To: Behrang Saeedzadeh
Cc: EcmaScript Discuss Mailing List; HTMLWG WG
Subject: Re: Element onResize and onMove events

It's a good API idea, but I think it's pointless to suggest new abstractions when Web Components and Mutation Observers exist.  You can custom-roll today (and in short order) a "move" event for all common browsers.

New additions to HTML should focus on either expanding its fundamental capability, or making gargantuan tasks smaller.  Library code can handle the rest.

On Thu, Dec 4, 2014 at 2:37 AM, Behrang Saeedzadeh <behrangsa@gmail.com<mailto:behrangsa@gmail.com>> wrote:
Hi,

Are there any plans to add resize and movement event listeners for DOM elements?

elem.addEventListener("move", function(e) {
    console.log(o.target.oldLocation);
    console.log(o.target.newLocation);
});

Are there technical limitations why these events or not being defined for elements?

Best regards,
Behrang

Received on Monday, 2 March 2015 22:19:28 UTC