Multimedia viewer, MobileFrontend (and possibly other extensions) introduce a concept of routes where navigating to '#/image/<title>' executes a certain piece of JavaScript. Clicking browser back navigates away from it and URLs can be shared. Before more and more extensions write their own code for this, let's generalise this and get this into core in some form.
The MobileFrontend code is pretty flexible and OOjs compatible. I see that OOjs ui has a concept of a WindowManager that would also benefit from being able to associate hash fragment urls with certain code.
Would the OOjs library be a good place for this code to live? Could I propose we discuss this in a future frontend standardisation meeting?
Requirements:
- The code should be lightweight as it's loaded early on in MobileFrontend.