It's a bit confusing, but updateLayout
isn't actually an event handler.
The navigation framework, which is included when starting from other templates, handles a different event (window.onresize
), and calls the updateLayout function if it exists. If you create a new project using the Navigation template, for example, and inspect navigator.js, you will see where the onresize
event is handled, and the updateLayout
function is called.
If you start from the Blank template, this functionality is not in place, so you would either need to (a) handle the onresize
event, (b) add navigator.js to your project, or (c) use a different project template.