Toast

html


<div class="test-area">
	<button id="button" class="button-primary" data-urushi-type="button">Toast up</button>
</div>

javascript


//main.js
require.config(requireConfig);
require(
	['templateEngine', 'templateConfig', 'Urushi', 'ToastManager'],
	function(templateEngine, templateConfig, Urushi,ToastManager) {
		templateEngine.renderDocument(document.body, templateConfig).then(function(result) {
			var manager = new ToastManager();
			document.body.appendChild(manager.getRootNode());

			Urushi.addEvent(
				result.widgets.button.getRootNode(),
				'click',
				manager,
				'show',
				'Toast demo');
		});
	}
);