Advertisement
Guest User

Untitled

a guest
Nov 9th, 2020
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. return view.extend({
  2.   load: function() {
  3.     return Promise.all(['blah.js', 'blah2.js', 'blah3.js'].map(function(src) {
  4.       return new Promise(function(resolveFn, rejectFn) {
  5.         document.querySelector('head').appendChild(E('script', {
  6.           src: src,
  7.           load: resolveFn,
  8.           error: rejectFn
  9.         }));
  10.       })
  11.     ]);
  12.   },
  13.   render: function() {
  14.     ...
  15.   }
  16. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement