Skip to content

Commit

Permalink
Always quote FakeEvent properties
Browse files Browse the repository at this point in the history
This is necessary to make sure that event properties are not renamed.

Closes #361

Change-Id: I8995a5d2979011d55ad8a244a5aa87aa547c11ab
  • Loading branch information
joeyparrish committed May 2, 2016
1 parent 46dffbf commit bce7322
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -1425,7 +1425,7 @@ shaka.Player.prototype.onBuffering_ = function(buffering) {
this.updateStats_();
this.buffering_ = buffering;

var event = new shaka.util.FakeEvent('buffering', { buffering: buffering });
var event = new shaka.util.FakeEvent('buffering', { 'buffering': buffering });
this.dispatchEvent(event);
};

Expand Down Expand Up @@ -1683,7 +1683,7 @@ shaka.Player.prototype.onTextTrackVisibility_ = function() {
shaka.Player.prototype.onError_ = function(error) {
goog.asserts.assert(error instanceof shaka.util.Error, 'Wrong error type!');

var event = new shaka.util.FakeEvent('error', { detail: error });
var event = new shaka.util.FakeEvent('error', { 'detail': error });
this.dispatchEvent(event);
};

Expand Down

1 comment on commit bce7322

@leandromoreira
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Please sign in to comment.