view nothing.js @ 15:5149a856d9dd default tip

Fix hybrid mode.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Thu, 03 Nov 2011 17:28:49 -0700
parents 03be0717d3f8
children
line wrap: on
line source

'use strict';

parsers[''] = function(item) {
	var toDate = function() {
		return new Date();
	};

	var toHTML = function(item, date) {
		var article = document.createElementNS(ns.xhtml, 'article');
		article.setAttributeNS(ns.e, 'id', item.id);
		article.setAttributeNS(ns.e, 'date', date.to8601());
		article.appendChild(document.createElementNS(ns.xhtml, 'h2').appendChild(document.createTextNode('This post is in an unknown namespace.')));
		return article;
	};

	this.xml = item.payload;
	this.date = toDate();
	this.html = toHTML(item, this.date);
}