title: Creating custom Dojo widgets
body: <p>I'm new to Dojo world. I tried to create a custom dojo widget from scratch.The problem that I'm facing is the widget is not getting parsed. I see that <code>postCreate</code> method of that widget is not getting called. The widget JS file is being downloaded from the server.</p>
  
  <p>Here are the steps what I followed.</p>
  
  <ol>
  <li><p>Created a JavaScript file CustomWidget.js in test folder.</p>
  
  <pre class="lang-js prettyprint-override"><code>dojo.provide('test.CustomWidget'); 
  dojo.require('dijit._Widget');
  
  dojo.declare('test.CustomWidget', dijit._Widget, {
  
      text: "Hello World",
  
      postCreate: function() {
          console.log(this.text+'text');
          this.domNode.innerHTML=this.text;
      }
  });
  </code></pre></li>
  <li><p>In my jsp file,I imported test.CustomWidget using <code>dojo.require</code>.</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;script type="text/javascript"&gt;
  
      dojo.require('test.CustomWidget');
  
      dojo.addOnLoad(function(){ dojo.parser.parse("addFavorites"); });
  &lt;/script&gt;
  &lt;div id='addFavorites' dojoType='test.CustomWidget'&gt;
  &lt;/div&gt;
  </code></pre></li>
  </ol>
  
  <p>I can see that CustomWidget.js file is being downloaded, but I don't see the console statement being printed. Can someone plese help me?</p>