There's a little known feature of YUI, which is the ability to know if a sandbox has "errored" while loading modules.
The API is very simple and embedded in the YUI().use(...) method (see reference).
Note that once a sandbox is in error state it will remain as such:
This is wouldn't be an issue by itself, but
- AUI actually uses a single sandbox, so one error will ruin the whole page
- with Senna.js once you break the sandbox it stays as such forever
- Liferay core apps are loading not-existent modules!!!
The offending AUI modules are io-request and parse-content loaded here:
- application-list-taglib at panel_category/end.jsp
- product-navigation-control-menu-web at add_content_body.jsp
- product-navigation-product-menu-web at portlet/view.jsp
- product-navigation-simulation-web at SimulationProductNavigationControlMenuEntry.java
The sum of all these things make using the status parameter of the callback passed to Y.use completely useless and therefore there's no programmatic way to know the health of the sandbox.