Sha256: 8816cf5a3cd6b5b8f9f4fb209db72a098cdcf9a31ecce15444ef437661fd1018
Contents?: true
Size: 1.04 KB
Versions: 6
Compression:
Stored size: 1.04 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.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
6 entries across 6 versions & 1 rubygems