Dojo fiddle
This JSFiddle is configured and ready to use for testing the Dojo framework.
HTML
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/dojo/1.9.1/dijit/themes/claro/claro.css">
<input type="text" id="myTxt" />
<input type="text" id="myTxtWidget" data-dojo-type="dijit/form/TextBox" />
JavaScript
require(["dojo/dom", "dijit/registry", "dojo/ready", "dijit/form/TextBox", "dojo/parser"], function(dom, registry, ready) {
ready(function() {
console.log(dom.byId("myTxt")); // Will work
console.log(dom.byId("myTxtWidget")); // Will "probably" work, but not recommended
console.log(registry.byId("myTxt")); // Will not work
console.log(registry.byId("myTxtWidget")); // Will work
});
});