webshim
Version:
modular capability-based polyfill loading libary, which extends jQuery with HTML5 features in legacy browsers
81 lines (61 loc) • 1.7 kB
HTML
<html>
<head>
<base href="http://127.0.0.1:8000/webshim/">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jQuery Test Suite</title>
<link rel="stylesheet" href="webshim/tests/qunit/qunit.css" type="text/css" media="screen">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.js"></script>
<script>
</script>
<script src="webshim/tests/qunit/qunit.js"></script>
<script src="webshim/src/extras/modernizr-custom.js"></script>
<script src="webshim/src/polyfiller.js"></script>
<script>
(function(){
$.webshims.ready('html5shiv', function(){
QUnit.reset = function(){
$("#main, #qunit-fixture").htmlPolyfill( QUnit.config.fixture );
};
});
})();
</script>
<script>
module("base tag loading");
asyncTest("init", function(){
$.webshims.ready('forms-ext', start);
});
asyncTest("base tag", function(){
ok(true, 'everything was loaded');
$.webshims.ready('forms-ext canvas geolocation', start);
});
</script>
<script>
/* load modules seperate and in reverse order to create race conditions */
$(window).load(function(){
$.webshims.polyfill();
});
</script>
<style type="text/css">
html { border: 0; }
#qunit-fixture {
position: static;
left: auto;
top: auto;
}
</style>
</head>
<body class="flora">
<h1 id="qunit-header">QUnit Test Suite</h1>
<h2 id="qunit-banner"></h2>
<div id="qunit-testrunner-toolbar"></div>
<h2 id="qunit-userAgent"></h2>
<ol id="qunit-tests"></ol>
<div id="qunit-fixture">
<form>
<input type="datetime-local" name="test-1" />
<input type="range" name="test-2" />
</form>
</div>
</body>
</html>