Skip to content

Commit

Permalink
fix(UI): Fixed details on failure to load.
Browse files Browse the repository at this point in the history
When switching from using document.createEvent to using the CustomEvent
constructor, we accidentally broke the "shaka-ui-load-failed" event
such that it no longer had a detail object. The detail object is meant
to be provided, not by itself, but as a member variable inside a custom
dictionary.
This fixes the syntax on the constructor.

Issue shaka-project#3388

Change-Id: I16dc025c21c8f0a012b5854bbbc56e8b110b2300
  • Loading branch information
theodab committed May 5, 2021
1 parent 7dd23b0 commit 6c528c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ shaka.ui.Overlay = class {
'reasonCode': reasonCode,
};
}
const uiLoadedEvent = new CustomEvent(eventName, detail);
const uiLoadedEvent = new CustomEvent(eventName, {detail});
document.dispatchEvent(uiLoadedEvent);
}

Expand Down

0 comments on commit 6c528c8

Please sign in to comment.