Icontem

File: examples/demo1.html

Recommend this page to a friend!
  Classes of Thomas Björk  >  JS and CSS Resource Loader  >  examples/demo1.html  >  Download  
File: examples/demo1.html
Role: Example script
Content type: text/plain
Description: Documentation
Class: JS and CSS Resource Loader
Load cached JavaScript and CSS from localStorage
Author: By
Last change:
Date: 5 years ago
Size: 536 bytes
 

Contents

Class file image Download
<!DOCTYPE html>
<html>
  <head>
    <title>ScriptLoader Demo 1</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="../resourceloader.js"></script>
    <script>
      window.resourceLoader.load("dummies/script1.js", {cache: true, cacheTimeout: 10, complete: function(options) {
        alert('Loaded this script: '+options.src);
      }});
      console.log(window.resourceLoader.getVersion());
    </script>
  </head>
  <body>
    <div></div>
  </body>
</html>