Is there an event indicating that the browser default font size has been changed, that is, at the moment it is changed?
I can’t find one and it appears that there isn’t one but I figured I’d ask anyway.
I’m trying to make an extension page layout adjust better for those who need a larger font. Since the user has to leave the page to change the font, I’ve been using the onfocus and onblur event of the window. The size of an element is recorded onblur and then its size is compared to that onfocus, and, if different, then a function is invoked.
It’s not perfect though because a delay is required before querying the size of the element after the font size is changed. I don’t know why, but if query the clientWidth of the element immediately onfocus it returns the old size rather than the new. A delay of 500ms is required for a large change in font size, such as from 9px to 72px.
Also, it fires every time the page gets the focus and there is that 500ms delay before displaying the page.
Is there any method via the extension APIs that can better accomplish this?
Thank you.