Skip to content

Commit

Permalink
Introduce an event for related videos being rendered.
Browse files Browse the repository at this point in the history
Summary:
Since this is done asynchronously, it's useful for client code to know when
the UI is ready. This is immediately needed for a video efficacy experiment
that renders a guider, suggesting a user watch a related video.

Reviewers: alpert

Reviewed By: alpert

Differential Revision: http://phabricator.khanacademy.org/D3779
  • Loading branch information
benkomalo committed Aug 26, 2013
1 parent ed48728 commit b8437b0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions related-videos.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ Exercises.RelatedVideos = {
});

container.toggle(videos.length > 0);
if (videos.length > 0) {
$(Exercises).trigger("relatedVideosRendered");
}
self._bindEvents();
});
},
Expand Down

0 comments on commit b8437b0

Please sign in to comment.