Merge pull request #210 from aronallen/fix/ie11svg
use parentNode instead of parentElementpull/219/head
commit
7da866270a
@ -0,0 +1,24 @@
|
||||
var assert = require('assert');
|
||||
|
||||
var snabbdom = require('../snabbdom');
|
||||
var h = require('../h').default;
|
||||
var patch = snabbdom.init([]);
|
||||
|
||||
describe('svg', function () {
|
||||
var elm, vnode0;
|
||||
beforeEach(function() {
|
||||
elm = document.createElement('svg');
|
||||
vnode0 = elm;
|
||||
});
|
||||
it('removes child svg elements', function(){
|
||||
var a = h('svg', {}, [
|
||||
h('g'),
|
||||
h('g')
|
||||
]);
|
||||
var b = h('svg', {}, [
|
||||
h('g')
|
||||
]);
|
||||
var result = patch(patch(vnode0, a), b).elm;
|
||||
assert.equal(result.childNodes.length, 1);
|
||||
});
|
||||
})
|
Loading…
Reference in New Issue