Creating a Dojo widget entirely within page markup

Very useful when developing your own widgets, or you just want to quickly test something.

Also useful when you just want to slightly change an exising widget e.g. change the CSS template, change the HTML template, or just override one or two methods.

You should see two blue buttons with custom properties below. They show an alert when clicked:


myown:TestButton widget

Wow button.


The yellow divs below show an alert when clicked, and they update the mouse.clientX text when the mouse is moved over it. The second yellow div shows how widget namespaces are used.