Permalink
Browse files

* Support for rolspan/colspan/title in HTML export.

  • Loading branch information...
1 parent 943c254 commit f6b621fcc82948cc3c70cecb18604fd43a85f756 @audreyt committed Dec 16, 2012
Showing with 24 additions and 0 deletions.
  1. +21 −0 sc.js
  2. +3 −0 src/sc.ls
View
21 sc.js
@@ -235,6 +235,27 @@
configurable: true,
enumerable: true
});
+ Object.defineProperty(prototype, 'colSpan', {
+ set: function(colspan){
+ this.attrs.colspan = colspan;
+ },
+ configurable: true,
+ enumerable: true
+ });
+ Object.defineProperty(prototype, 'rowSpan', {
+ set: function(rowspan){
+ this.attrs.rowspan = rowspan;
+ },
+ configurable: true,
+ enumerable: true
+ });
+ Object.defineProperty(prototype, 'title', {
+ set: function(title){
+ this.attrs.title = title;
+ },
+ configurable: true,
+ enumerable: true
+ });
Object.defineProperty(prototype, 'innerHTML', {
set: function(raw){
this.raw = raw;
View
@@ -111,6 +111,9 @@ catch => class => (code) ->
width: ~(@attrs.width)->
height: ~(@attrs.height)->
className: ~(@attrs.class)->
+ colSpan: ~(@attrs.colspan)->
+ rowSpan: ~(@attrs.rowspan)->
+ title: ~(@attrs.title)->
innerHTML: ~
(@raw)->
-> @raw or [e.outerHTML for e in @elems].join("\n")

0 comments on commit f6b621f

Please sign in to comment.