On iOS 11, Chrome, perform the following steps on the new specialpages branch:
- Visit article
- Click settings cog in menu to visit Special:MobileOptions
- Change font size to XL
- Click back button
Expected:
The font-size should switch from normal to XL on the back button
Actual:
The font-size does not change.
To remedy this, we need to update the font size not only when the script is loaded but on some event. The question is which event?
Question to answer:
What JavaScript event mystery-event captures this scenario and allows us to do something like this?:
function updateFontSize() { $( '#content p, .content p' ).css( 'font-size', userFontSize + '%' ); } $( window ).on( 'mystery-event', updateFontSize );
Developer notes
I had a quick look at using load and popstate events, neither of them seem to fire in this scenario. Which event can we use?