domtokenlist
Version:
Enables support for the DOMTokenList interface in IE8-9, and fixes buggy implementations in newer browsers.
29 lines (24 loc) • 783 B
HTML
<html class="no-js">
<head>
<title>Patterns</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script type="text/javascript" src="../token-list.js"></script>
<link class="fingers crossed" rel="stylesheet something awesome or whatever" type="text/css" src="#" />
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
</head>
<body>
<style type="text/css">
html.no-js{
background: #f00;
}
</style>
<div id="garnet" class="gemstone jewel mineral red"></div>
<div id="topaz" class="gemstone orange jewel"></div>
<script type="text/javascript">
var tokens = document.getElementById("garnet").classList;
var link = document.getElementsByTagName("link")[0];
var rels = link.rel;
</script>
</body>
</html>