title: How to read a promise in a strict js file
body: <p>I am working on a program that runs in ECMA 5.</p>
  <p>All js files are use strict and this makes most suggestions online not usable as for example return new Promise.resolve is not usable in strict mode.</p>
  <p>I am calling an async method to get an url and if a url is returned then the user should see a button that when pressed will forward the user to that page. I have this working with async and await. Now I want to move this from page load to do this after page is loaded so it doesn't affect page rendering. in case the service is down.</p>
  <pre><code>    var self = this;
      $(document).ready(function () {
          alert(&quot;ok&quot;);
          var promise = $.get(myService.getMyUrl());
          $.when.apply(self, promise).then(function() {
              self.url(arguments);
              self.showButton(self.url() ? true : false);
          });
      });
  </code></pre>
  <p>The alert gets shown so I know I'm getting here, but the problem is that I can't make the function an async function and simply await the result so how do I resolve the promise?</p>
  <p>As stated above I already tried new Promise.resolve() (gives: using a variable without declaring it is not allowed in strict mode) and this code also does not work as arguments is not readable in strict mode. Any other ideas?</p>