Permalink
Browse files

Adding a quick example.

  • Loading branch information...
1 parent 16218f0 commit 374407ffc0dd3b2efaec7accff0c50f38eaeaa67 Jens Arps committed Oct 1, 2011
Showing with 39 additions and 0 deletions.
  1. +22 −0 examples/index.html
  2. +17 −0 examples/myapp.js
View
@@ -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>
View
@@ -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.