Skip to content

Instantly share code, notes, and snippets.

@desigens
Created October 17, 2015 10:51
Show Gist options
  • Select an option

  • Save desigens/7c8048f390b2cb21471c to your computer and use it in GitHub Desktop.

Select an option

Save desigens/7c8048f390b2cb21471c to your computer and use it in GitHub Desktop.

Revisions

  1. desigens created this gist Oct 17, 2015.
    27 changes: 27 additions & 0 deletions test.html
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,27 @@
    <!DOCTYPE html>
    <html>
    <head>
    <title></title>
    <style type="text/css">
    body.a {
    background: url(http://ololo.com/i.png) no-repeat;
    }
    </style>
    </head>
    <body onload="end()" id="body">
    <div id="a">null1</div>
    <script type="text/javascript">
    Date.now = Date.now || function() { return +new Date; };
    var t = Date.now();
    var out = document.getElementById('a')
    // console.time(1);
    function end () {
    // console.timeEnd(1);
    out.innerHTML = (Date.now() - t);
    }
    setTimeout(function () {
    document.getElementById('body').className = 'a';
    }, 0);
    </script>
    </body>
    </html>