Created
January 18, 2015 18:55
-
-
Save joeybaker/dbef2bf3885312b43d8a to your computer and use it in GitHub Desktop.
vdom err example
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
<body><main><h1>hi</h1><img width="500" src="http://cat.jpg.to"><input><p>graf</p></input></img></main></body> |
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
'use strict'; | |
var vdomMixin = require('ampersand-virtual-dom-mixin') | |
, AView = require('ampersand-view') | |
, View | |
, view | |
View = AView.extend(vdomMixin, { | |
template: function template(){ | |
return '<main><h1>hi</h1><img width=500 src="http://cat.jpg.to"><input><p>graf</p></main>' | |
} | |
, render: function render(){ | |
this.renderWithTemplate(this) | |
return this | |
} | |
}) | |
view = new View() | |
document.body.appendChild(view.render().el) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment