Sha256: 1fffa7f53d39f40748305320b33600193f53ae0861b255569bdce0103e2cf4e7
Contents?: true
Size: 1.05 KB
Versions: 2
Compression:
Stored size: 1.05 KB
Contents
describe 'uki.dom' it 'should create elements with style' x = uki.createElement('div', 'margin: 2px;border: 1px solid red'); // IE reorders elements x.style.border.should.include 'solid' x.style.border.should.include '1px' x.style.border.should.include 'red' end it 'should create stylesheets' x = uki.createElement('div') x.className = 'test' + uki.dom.guid++ uki.dom.createStylesheet('.' + x.className + ' { display: inline !important; }') uki.dom.probe(x, function() { uki.dom.computedStyle(x).display.should.be 'inline' }); end it 'should check if element contains another one' x = uki.createElement('div', '', '<span><b>1</b></span>') uki.dom.contains(x, x.firstChild).should.be_true uki.dom.contains(x, x.firstChild.firstChild).should.be_true uki.dom.contains(document.body, x).should.be_false uki.dom.probe(x, function() { uki.dom.contains(document.body, x).should.be_true }) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
uki-1.0.1 | frameworks/uki/spec/unit/dom.spec.js |
uki-1.0.0 | frameworks/uki/spec/unit/dom.spec.js |