CustomEvent : onFontResize

How to test?

Try to adjust fontSize

How it works?

1 : Create an Iframe

Example: <iframe style="position:absolute;top:-5000px;width:100em;"></iframe>

2 : Attach onResize Event to iframe's window object

3 : When fontSize is changed, this Iframe will fire an onResize event which we can catch later.

Why using Iframe?

  1. For Internet Explorer

    IFRAME has its native onResize event

  2. For other modern browsers

    IFRAME.contentWindow is a window object, which also has its native onResize event


on Font Size Change