Widgets and macro calls should be spans not divs

Although it does mean that we'll end up creating divs inside spans,
which isn't strictly legal but works in all browsers
print-window-tiddler
Jeremy Ruston 2012-12-20 10:37:51 +00:00
rodzic 2689f6b1e5
commit 6ccf13e624
2 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -83,7 +83,7 @@ MacroCallRenderer.prototype.render = function(type) {
MacroCallRenderer.prototype.renderInDom = function() {
// Create the element
this.domNode = document.createElement("div");
this.domNode = document.createElement("span");
this.domNode.setAttribute("data-macro-name",this.parseTreeNode.name);
// Render any child nodes
var self = this;

Wyświetl plik

@ -77,7 +77,7 @@ WidgetRenderer.prototype.render = function(type) {
WidgetRenderer.prototype.renderInDom = function() {
// Create the wrapper element
this.domNode = document.createElement("div");
this.domNode = document.createElement("span");
this.domNode.setAttribute("data-widget-type",this.parseTreeNode.tag);
this.domNode.setAttribute("data-widget-attr",JSON.stringify(this.attributes));
// Render the widget if we've got one