set checbox indeterminate state

by schlomm

HTML

<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/dojo/1.9.1/dijit/themes/claro/claro.css">
<input id="myCheckbox" type="checkbox" tabindex="0" aria-checked="true">

JavaScript

require(["dojo/query", "dojo/NodeList-traverse", "dojo/NodeList-dom", "dojo/domReady!"], function(query) {
  var setindeterminate = function() {
    var chexbox = query("[type^='checkbox']")[0]
    chexbox.checked = true
    chexbox.indeterminate = true
    chexbox.setAttribute("aria-checked", "mixed")
    //debugger;
  }
  setindeterminate()
});