• Noel Gordon's avatar
    VideoPlayer initialization: await DOMContentLoaded · 99d36903
    Noel Gordon authored
    Make the initialization promise await DOMContentLoaded and then apply
    i18n transforms to the video player DOM [1].
    
    Minor: correct commentary, add commentary. Add assertions re document
    readyState when the i18n template strings are applied.
    
    [1] Applying i18n strings to an incomplete (readyState === 'loading')
    DOM document makes no sense at all.
    
    Test: browser_tests --gtest_filter="VideoPlayerBrowserTest*"
    Bug: 884963
    Change-Id: Ie5a25763c54c56e949edde40c7e06b8eaad230c4
    Reviewed-on: https://chromium-review.googlesource.com/1233394
    Commit-Queue: Noel Gordon <noel@chromium.org>
    Reviewed-by: default avatarTrent Apted <tapted@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#592690}
    99d36903
video_player.js 25.5 KB