OpenF2 / F2

Redefining web integration for the financial services community
Apache License 2.0
129 stars 62 forks source link

AppHandler APP_DESTROY_AFTER exists and so does "RESOURCE_FAILED_TO_LOAD" #222

Closed markhealey closed 9 years ago

markhealey commented 9 years ago

I can't recall why there are multiple things happening on errors like this (and in other places) but this should be cleaned up.

In container.js, both of these are fired when a script fails to load:

F2.Events.emit('RESOURCE_FAILED_TO_LOAD', evtData);
...
_appScriptLoadFailed(appConfigs[0], evtData.src);

If nothing else, the former should be added to the F2.Constants.Events object. Let's mark RESOURCE_FAILED_TO_LOAD for deprecation.

markhealey commented 9 years ago

@montlebalm you wanna grab this since you were just in #220? After thinking some more on it, we need to keep that RESOURCE_FAILED_TO_LOAD event around and definitely mark it for deprecation.

Surprisingly, the docs have no mention of this event being fired in the life cycle which also needs to be addressed.

markhealey commented 9 years ago

Also just noticed this new event APP_SCRIPTS_LOADED is not in Constants but is well-documented.

https://github.com/OpenF2/F2/blob/1.4-wip/docs/src/container-development.md#when-are-scripts-loaded

Let's add it to Constants, too.

montlebalm commented 9 years ago

@markhealey Sure I'll take this one.

markhealey commented 9 years ago

Closed #227 in #142 v1.4.0