1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-09-29 23:40:45 +00:00

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
This commit is contained in:
Jeremy Ruston 2012-12-20 10:37:51 +00:00
parent 2689f6b1e5
commit 6ccf13e624
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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