Skip to content

Commit

Permalink
fix #293 SVG sample broken on playground
Browse files Browse the repository at this point in the history
Close #303
  • Loading branch information
marclaval committed Sep 19, 2014
1 parent 2fc1aec commit a3c20cd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion docs/samples/clock/clock.spec.js
@@ -1,5 +1,6 @@
var hashTester = require('hsp/utils/hashtester');
var sample = require('./clock.hsp');
var browser = require("hsp/rt/browser.js");

describe('"Clock" sample', function () {

Expand All @@ -15,6 +16,11 @@ describe('"Clock" sample', function () {
});

it('should render "Clock"', function () {

if (browser.supportsSvg()) {
var circles = h.container.querySelectorAll("circle");
for (var i = 0; i < circles.length; i++) {
expect(circles[i].className.baseVal).to.equal("clock-face");
}
}
});
});
2 changes: 1 addition & 1 deletion hsp/rt/attributes/class.js
Expand Up @@ -55,7 +55,7 @@ var ClassHandler = klass({
this.previousClasses = newClasses;

//Add generated className to the element (issue on IE8 with the class attribute?)
if (this.nodeNS) {
if (this.nodeInstance.nodeNS) {
this.nodeInstance.node.setAttribute("class", results.join(' '));
} else {
this.nodeInstance.node.className = results.join(' ');
Expand Down

0 comments on commit a3c20cd

Please sign in to comment.