JSFiddle - React, Tailwind, and code Playground
by Thomas Upton
HTML
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/dojo/1.8/dojo/resources/dojo.css">
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/dojo/1.8/dijit/themes/tundra/tundra.css">
<body class="tundra"></body>
JavaScript
require(['dojo/_base/declare','dijit/_WidgetBase','dijit/Dialog', 'dijit/form/TextBox'], function(declare, _WidgetBase, Dialog, TextBox) {
var MyClass = declare([_WidgetBase], {
x: function() {
var d = new Dialog({
content: "mycontent"
});
d.show();
var t = new TextBox();
t.placeAt(this.domNode);
t.startup();
this.on('foo', function() {
alert('foo fired - MyClass');
});
d.on('foo', function() {
alert('foo fired - Dialog');
});
d.emit('foo');
t.emit('foo');
}
});
var c = new MyClass();
c.placeAt(document.body);
c.startup();
c.x();
});