diff --git a/whalesong/js-assembler/runtime-src/baselib-boxes.js b/whalesong/js-assembler/runtime-src/baselib-boxes.js
index 7f495ab..4c87172 100644
--- a/whalesong/js-assembler/runtime-src/baselib-boxes.js
+++ b/whalesong/js-assembler/runtime-src/baselib-boxes.js
@@ -3,7 +3,7 @@
// Exceptions
-(function(baselib) {
+(function(baselib, $) {
'use strict';
var exports = {};
baselib.boxes = exports;
@@ -43,16 +43,18 @@
};
Box.prototype.toDomNode = function(params) {
- var node = document.createElement("span");
+ var node = $('');
if (params.getMode() === 'constructor') {
- node.appendChild(document.createTextNode("(box "));
- node.appendChild(params.recur(this.val));
- node.appendChild(document.createTextNode(")"));
+ node.append($('').text('(').addClass('lParen'));
+ node.append($('').text('box'));
+ node.append(" ");
+ node.append(params.recur(this.val));
+ node.append($('').text(')').addClass('rParen'));
} else {
- node.appendChild(document.createTextNode('#&'));
- node.appendChild(params.recur(this.val));
+ node.append($('').text('#&'));
+ node.append(params.recur(this.val));
}
- return node;
+ return node.get(0);
};
Box.prototype.equals = function(other, aUnionFind) {
@@ -101,4 +103,4 @@
exports.makeImmutableBox = makeImmutableBox;
-}(this.plt.baselib));
\ No newline at end of file
+}(this.plt.baselib, jQuery));