Skip to content

Instantly share code, notes, and snippets.

@joeybaker
Created January 18, 2015 18:55
Embed
What would you like to do?
vdom err example
<body><main><h1>hi</h1><img width="500" src="http://cat.jpg.to"><input><p>graf</p></input></img></main></body>
'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