To use the custom element, you must use the "is" attribute
<input is="tristate-checkbox" checked name="foo" id="bar"></input>
Now you can add the "indeterminate" attribute
<input is="tristate-checkbox" indeterminate name="qux" id="baz"></input>
You can also create a "tristate-checkbox" in javascript
<script type="text/javascript"> var cb = new TristateCheckbox(); cb.setAttribute('indeterminate',true); //or simply cb.indeterminate = true; document.body.appendChild(cb); </script>