mirror of
https://github.com/danog/inline-critical.git
synced 2024-11-30 04:29:07 +01:00
aa4477dd6d
As per the loadcss docs, this actually fixes a huge issue with IE 10 and 11 I could test.
59 lines
2.9 KiB
HTML
59 lines
2.9 KiB
HTML
<!doctype html>
|
|
<html class="no-js">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>critical css test</title>
|
|
<meta name="description" content="">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
|
|
|
|
<!-- build:css styles/main.css -->
|
|
<link rel="preload" href="css/main.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
|
|
<noscript>
|
|
<link rel="stylesheet" href="css/main.css">
|
|
</noscript>
|
|
<script id="loadcss">
|
|
!function(t){"use strict";t.loadCSS||(t.loadCSS=function(){});var e=loadCSS.relpreload={};if(e.support=function(){var e;try{e=t.document.createElement("link").relList.supports("preload")}catch(t){e=!1}return function(){return e}}(),e.bindMediaToggle=function(t){function e(){t.media=a}var a=t.media||"all";t.addEventListener?t.addEventListener("load",e):t.attachEvent&&t.attachEvent("onload",e),setTimeout(function(){t.rel="stylesheet",t.media="only x"}),setTimeout(e,3e3)},e.poly=function(){if(!e.support())for(var a=t.document.getElementsByTagName("link"),n=0;n<a.length;n++){var o=a[n];"preload"!==o.rel||"style"!==o.getAttribute("as")||o.getAttribute("data-loadcss")||(o.setAttribute("data-loadcss",!0),e.bindMediaToggle(o))}},!e.support()){e.poly();var a=t.setInterval(e.poly,500);t.addEventListener?t.addEventListener("load",function(){e.poly(),t.clearInterval(a)}):t.attachEvent&&t.attachEvent("onload",function(){e.poly(),t.clearInterval(a)})}"undefined"!=typeof exports?exports.loadCSS=loadCSS:t.loadCSS=loadCSS}("undefined"!=typeof global?global:this);
|
|
</script>
|
|
|
|
<!-- endbuild -->
|
|
|
|
</head>
|
|
<body>
|
|
<!--[if lt IE 10]>
|
|
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
|
|
<![endif]-->
|
|
|
|
<div class="container">
|
|
<div class="header">
|
|
<ul class="nav nav-pills pull-right">
|
|
<li class="active"><a href="#">Home</a></li>
|
|
<li><a href="#">About</a></li>
|
|
<li><a href="#">Contact</a></li>
|
|
</ul>
|
|
<h3 class="text-muted">critical css test</h3>
|
|
</div>
|
|
|
|
<div class="jumbotron">
|
|
<h1>'Allo, 'Allo!</h1>
|
|
<p class="lead">Always a pleasure scaffolding your apps.</p>
|
|
<p><a class="btn btn-lg btn-success" href="#">Splendid!</a></p>
|
|
</div>
|
|
|
|
<div class="row marketing">
|
|
<div class="col-lg-6">
|
|
<h4>HTML5 Boilerplate</h4>
|
|
<p>HTML5 Boilerplate is a professional front-end template for building fast, robust, and adaptable web apps or sites.</p>
|
|
|
|
<h4>Bootstrap</h4>
|
|
<p>Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="footer">
|
|
<p>♥ from the Yeoman team</p>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|