-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create Compound Events #4
Comments
Per conversation with @jiggliemon, it's the execution of Right, @jiggliemon? |
Right. For instance, and sake of argument, you'll only load both a template and model data once. Thereby determining that once each has fired once, you can safely fire the Another example where an App depends on having the Async loading "FB" object available: window.addEventListener('DOMContentLoaded', function() {
fireEvent('DOM:Ready');
});
fbAsyncInit = function() {
fireEvent('FB:Ready')
};
// with optional second string argument to make
// for easier accessibility?
addEvent(['DOM:Ready','FB:Ready'], 'APP:Ready');
APP = {
init: function () {
addEvent('APP:Ready', function() {
FB.api('/me', function (response) {
$('name').set('text', response.name);
})
});
}
} Notice how the APP#init method has a dependency on both the |
I made a quick example here using switches. However im still not sure this is the best way to go. |
I've implemented it in blocks: |
A way to call an event that consists of >=2 events.
The text was updated successfully, but these errors were encountered: