1.0.4 • Published 10 years ago
roomjs v1.0.4
## General
Support
| Firefox | Chrome (Mobile) | Safari (Mobile) | IE | Opera |
|---|---|---|---|---|
| 3.5+ | 4+ (2.1+) | 3.1+ (3.2+) | 8+ | 12+ |
Shadow DOM
If you wanna use the Shadow DOM ability of this framework, it's recommended to add the Polyfill for Shadow manipulations by Google. You'll find it here.
Native compatibility
| Firefox | Chrome (Mobile) | Safari | IE | Opera |
|---|---|---|---|---|
| - | 25+ (4.4+) | - | - | 15+ |
Usage
### HTML
We are going to use this snippet below for our examples.
var App = Room.app('main');
App.register('TestModule', ['jQuery', function($) {
return {
init: function() {
$('body').css('color', 'red');
this.renderData({
message: 'Hello World'
});
}
};
}]);
// Additional stuff here ...
App.init();Elements
<test-module>
<p>Message: {{ message }}</p>
</test-module>Classes
<div class="test-module">
<p>Message: {{ message }}</p>
</div>Attributes
<div rm-component="test-module">
<p>Message: {{ message }}</p>
</div>