2012-12-13 21:34:31 +00:00
|
|
|
/*\
|
|
|
|
title: $:/core/modules/rendertree/renderers/raw.js
|
|
|
|
type: application/javascript
|
|
|
|
module-type: wikirenderer
|
|
|
|
|
|
|
|
Raw HTML renderer
|
|
|
|
|
|
|
|
\*/
|
|
|
|
(function(){
|
|
|
|
|
|
|
|
/*jslint node: true, browser: true */
|
|
|
|
/*global $tw: false */
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
/*
|
|
|
|
Raw HTML renderer
|
|
|
|
*/
|
2013-05-15 16:32:17 +00:00
|
|
|
var RawRenderer = function(renderTree,parentRenderer,parseTreeNode) {
|
2012-12-13 21:34:31 +00:00
|
|
|
// Store state information
|
|
|
|
this.renderTree = renderTree;
|
2013-05-15 16:32:17 +00:00
|
|
|
this.parentRenderer = parentRenderer;
|
2012-12-13 21:34:31 +00:00
|
|
|
this.parseTreeNode = parseTreeNode;
|
|
|
|
};
|
|
|
|
|
|
|
|
RawRenderer.prototype.renderInDom = function() {
|
2013-05-17 09:12:25 +00:00
|
|
|
var domNode = this.renderTree.document.createElement("div");
|
2012-12-13 21:34:31 +00:00
|
|
|
domNode.innerHTML = this.parseTreeNode.html;
|
|
|
|
return domNode;
|
|
|
|
};
|
|
|
|
|
|
|
|
exports.raw = RawRenderer
|
|
|
|
|
|
|
|
})();
|