HUE-8458 [frontend] Load new scripts using $.get and eval instead of appending <script> tags

Review Request #13204 - Created July 23, 2018 and submitted

Johan Åhlén
hue
master
hue
enricoberti, jgauthier, ranade, romain, roohi, weixia, yingc
commit 61331c466c7a58a86dbe7f0d62d70fff614dd740
Author: Johan Ahlen <johan@johanahlen.com>
Date:   Mon Jul 23 10:42:24 2018 +0200

    HUE-8458 [frontend] Load new scripts using $.get and eval instead of appending <script> tags
    
    It turns out that <script> tags are completely synchronous when appending them after the page has loaded.
    
    By using $.get instead we can fetch all the js contents async and evaluate in order once all of them are loaded.
    
    This saves a few seconds on high latency connections.

:100644 100644 a44985287d... 1063484b21... M	desktop/core/src/desktop/templates/hue.mako
Manual on Chrome
  1. eval('console.log("Ship it!")');
  2. 
      
Review request changed

Status: Closed (submitted)

Loading...