Created
May 27, 2014 22:20
-
-
Save john45traver/6e197584edf35f1c658d to your computer and use it in GitHub Desktop.
Passing Element to content
This file contains hidden or 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
var Engine = require("famous/core/Engine"); | |
var Surface = require("famous/core/Surface"); | |
var mainContext = Engine.createContext(); | |
content = document.createElement('p') | |
content.innerHTML = "Hello" | |
content.onclick = function(){console.log("Hello!")} | |
surface = new Surface({ | |
size:[200,200], | |
content: content, | |
properties: { | |
backgroundColor: 'green' | |
} | |
}) | |
mainContext.add(surface); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment