Skip to content

Instantly share code, notes, and snippets.

@john45traver
Created May 27, 2014 22:20
Show Gist options
  • Save john45traver/6e197584edf35f1c658d to your computer and use it in GitHub Desktop.
Save john45traver/6e197584edf35f1c658d to your computer and use it in GitHub Desktop.
Passing Element to content
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