Skip to content

Instantly share code, notes, and snippets.

@joeybaker
Created January 18, 2015 18:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joeybaker/dbef2bf3885312b43d8a to your computer and use it in GitHub Desktop.
Save joeybaker/dbef2bf3885312b43d8a to your computer and use it in GitHub Desktop.
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