map.apps Bundle APIs 4.20.0
    Preparing search index...
    • Loads a css file and returns a Promise to support waiting for the load.

      Parameters

      • hrefs: string[]

        url(s) to the css file.

      • Optionaltimeout: number

        Time to wait for the file to be loaded (optional).

      Returns CancelablePromise<LoadCssResult[]>

      A cancelable promise resolving the css file(s).

      import loadCSS from "apprt-core/load-css";

      loadCss(require.toUrl("./test.css")).then(function(result){
      // result.url = url of css
      // result.link = link created in head
      // css loaded
      });
      import loadCSS from "apprt-core/load-css";

      loadCss([
      require.toUrl("./a.css"),
      require.toUrl("./b.css")
      ]).then(function(results){
      // result[0].url = url of css
      // result[0].link = link created in head
      // css loaded
      });
    • Loads a css file and returns a Promise to support waiting for the load.

      Parameters

      • href: string
      • Optionaltimeout: number

        Time to wait for the file to be loaded (optional).

      Returns CancelablePromise<LoadCssResult>

      A cancelable promise resolving the css file(s).

      import loadCSS from "apprt-core/load-css";

      loadCss(require.toUrl("./test.css")).then(function(result){
      // result.url = url of css
      // result.link = link created in head
      // css loaded
      });
      import loadCSS from "apprt-core/load-css";

      loadCss([
      require.toUrl("./a.css"),
      require.toUrl("./b.css")
      ]).then(function(results){
      // result[0].url = url of css
      // result[0].link = link created in head
      // css loaded
      });