Created
October 21, 2012 22:24
-
-
Save podefr/3928740 to your computer and use it in GitHub Desktop.
issue #8 Olives
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Olives experiments</title> | |
</head> | |
<body> | |
<div class="doStuffHere"> | |
<p data-model="bind: show, stuff"></p> | |
</div> | |
<script src="lib/require.js"></script> | |
<script src="lib/Emily.min.js"></script> | |
<script src="lib/Olives.min.js"></script> | |
<script> | |
require(['Olives/OObject', 'Store', 'Olives/Model-plugin'], function (OObject, Store, ModelPlugin) { | |
var TestUI = function TestUIConstructor() { | |
var store = new Store, | |
testUI = new OObject(store); | |
testUI.plugins.add("model", new ModelPlugin(store, { | |
show: function (args) { | |
console.log(args); | |
} | |
})); | |
return testUI; | |
}; | |
test = new TestUI; | |
test.alive(document.querySelector(".doStuffHere")); | |
test.model.set('stuff', ['boogie', 'all', 'night']); | |
test.model.set('stuff', ['boogie', 'all', 'night']); | |
test.model.update('stuff', ['boogie', 'all', 'night']); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment