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

Fixed component.trigger doesn't pass event object issue #1298 #1310

Merged
merged 2 commits into from Jul 28, 2014

Conversation

Projects
None yet
3 participants
@bceacuna
Contributor

bceacuna commented Jun 24, 2014

No description provided.

@mmcc mmcc added the enhancement label Jun 24, 2014

@heff

This comment has been minimized.

Show comment
Hide comment
@heff

heff Jun 26, 2014

Member

Thanks!

Member

heff commented Jun 26, 2014

Thanks!

Show outdated Hide outdated src/js/component.js
*
* @param {String} type The event type to trigger, e.g. 'click'
* @param {Event|Object} event The event object to be passed to the listener
* @param {Object} event either a string (the event type)

This comment has been minimized.

@heff

heff Jun 26, 2014

Member

The jsdoc type here would be {Event|Object|String}

@heff

heff Jun 26, 2014

Member

The jsdoc type here would be {Event|Object|String}

This comment has been minimized.

@bceacuna

bceacuna Jun 26, 2014

Contributor

done

@bceacuna

bceacuna Jun 26, 2014

Contributor

done

Show outdated Hide outdated src/js/events.js
@@ -265,7 +265,9 @@ vjs.fixEvent = function(event) {
/**
* Trigger an event for an element
* @param {Element|Object} elem Element to trigger an event on
* @param {String} event Type of event to trigger
* @param {Object} event either a string (the event type)

This comment has been minimized.

@heff

heff Jun 26, 2014

Member

Same jsdoc type {Event|Object|String}

@heff

heff Jun 26, 2014

Member

Same jsdoc type {Event|Object|String}

This comment has been minimized.

@bceacuna

bceacuna Jun 26, 2014

Contributor

done

@bceacuna

bceacuna Jun 26, 2014

Contributor

done

Show outdated Hide outdated src/js/component.js
@@ -563,13 +563,15 @@ vjs.Component.prototype.one = function(type, fn) {
* Trigger an event on an element
*
* myComponent.trigger('eventName');
* myComponent.trigger({'type':'eventName', 'value':'eventValue'});

This comment has been minimized.

@heff

heff Jun 26, 2014

Member

Can you remove value from the example? I don't want to give people the idea that it's standard value on an event object.

@heff

heff Jun 26, 2014

Member

Can you remove value from the example? I don't want to give people the idea that it's standard value on an event object.

This comment has been minimized.

@bceacuna

bceacuna Jun 26, 2014

Contributor

Done

@bceacuna

bceacuna Jun 26, 2014

Contributor

Done

@heff heff merged commit d24a9b4 into videojs:master Jul 28, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details
* @param {Element|Object} elem Element to trigger an event on
* @param {String} event Type of event to trigger
* @param {Element|Object} elem Element to trigger an event on
* @param {Event|Object|String} event either a string (the event type)

This comment has been minimized.

@heff

heff Jul 28, 2014

Member

FYI, I had to change these comments to be single-line otherwise the docs parser wasn't picking up anything but the first line

@heff

heff Jul 28, 2014

Member

FYI, I had to change these comments to be single-line otherwise the docs parser wasn't picking up anything but the first line

@heff

This comment has been minimized.

Show comment
Hide comment
@heff

heff Jul 28, 2014

Member

Thank you!

If you're on IRC check out the #videojs room and chat with other contributors.

Member

heff commented Jul 28, 2014

Thank you!

If you're on IRC check out the #videojs room and chat with other contributors.

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