Skip to content
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

Bulletproofing Event Redispatching #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Bulletproofing Event Redispatching #2

wants to merge 2 commits into from

Conversation

cthos
Copy link

@cthos cthos commented Aug 17, 2011

Adds some bulletproofing to the API event dispatching, in the event that for whatever reason you have a broken jQuery/Prototype install basic events will still fire.

We found that for whatever reason Prototype's .fire event was failing, which would cause basic events to fail silently. This added a tiny bit to the filesize, so I went ahead and made a minified version using yui compressor v2.4.2.

…hat for whatever reason you have a broken jQuery/Prototype install basic events will still fire.
}else if(window.Prototype){
// if Prototype.js is available, fire the custom event
$(playerNode).fire(customEventType, data);
try {
$(playerNode).fire(customEventType, data);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it makes sense, I guess. Could you format/indent it accordingly, and we'll merge it in. thanks!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing, I've changed the indentation to spaces, and removed some of the whitespace from the if/try/catch statements to match your formatting in 0326c6e.

@jonschmidt
Copy link

@bruderstein can we get some movement here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants