davidjbradshaw / iframe-resizer

Keep iFrames sized to their content.
https://iframe-resizer.com
Other
6.69k stars 982 forks source link

Add addEventListener() and removeEventListener() methods #710

Open gruns opened 5 years ago

gruns commented 5 years ago

Currently event handlers can only be setup at initialization time in the constructor's options parameter.

Instead, iFrameResizer should implement the standard EventTarget interface

with addEventListener(), removeEventListener(), and dispatchEvent() so 1) iFrameResizer follows the standard JS events API and 2) event handling can change dynamically.

davidjbradshaw commented 5 years ago

Do you want to make a PR?

gruns commented 5 years ago

Do you want to make a PR?

I'd love to, but I am starved for time right now. I won't be able to take a stab at this for, at minimum, a few weeks.

To anyone with providential inclination: feel free to take a crack at this.

davidjbradshaw commented 5 years ago

I am on holiday for the next month, so no rush

davidjbradshaw commented 9 months ago

Roadmapped for v5.1

bertho-zero commented 2 months ago

That would be nice, we can't add onMessage after initialization at the moment