Skip to content

Commit

Permalink
Adding a quick example.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jens Arps committed Oct 1, 2011
1 parent 16218f0 commit 374407f
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
22 changes: 22 additions & 0 deletions examples/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<title>EmbedJS Example</title>
<script>
var require = {
baseUrl: '../src/',
paths: {
'implementations': '../platforms/unknown'
}
};
</script>
<script type="text/javascript" src="../src/require.js"></script>
<script type="text/javascript">
require(['../examples/myapp'], function(myApp){
myApp.kickoff();
});
</script>
</head>
<body>
</body>
</html>
17 changes: 17 additions & 0 deletions examples/myapp.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
define(['feature!html-element'],function(embed){
return {

containerNode: null,

kickoff: function(){
this.renderNodes();
},

renderNodes: function(){
this.containerNode = embed.create('div', {
innerHTML: 'It works!'
}, embed.body());
}

};
});

0 comments on commit 374407f

Please sign in to comment.