-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.html
38 lines (35 loc) · 938 Bytes
/
test.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<!DOCTYPE html>
<html>
<head>
<title>Test</title>
<script src="node_modules/jquery/dist/jquery.js"></script>
<script src="node_modules/underscore/underscore.js"></script>
<script src="node_modules/backbone/backbone.js"></script>
<script src="node_modules/backbone.marionette/lib/backbone.marionette.js"></script>
<script src="dist/backbone.marionette.style.js"></script>
<script>
Marionette.Behaviors.behaviorsLookup = function() {
return {
Style: Marionette.StyleBehavior
};
};
var template = _.template('<div></div>');
var StyleView = Marionette.ItemView.extend({
template: template,
behaviors: {
Style: {}
},
style: function() {
return {
backgroundColor: this.model.get('backgroundColor')
}
}
});
var view = new StyleView();
view.render();
console.log(view);
</script>
</head>
<body>
</body>
</html>