Sha256: 08a9acab6e2d093c869b07f367686ea653d9c0852c4e44278554a984fe460b96
Contents?: true
Size: 1.52 KB
Versions: 31
Compression:
Stored size: 1.52 KB
Contents
/* */ "format cjs"; (function($){ var id = 'addready-test'+ (new Date().getTime()); $.webshims.addReady(function(context, contextElem){ contextElem.filter('#webshim-structure').addClass(id); $(context).children('#webshim-structure').filter('#webshim-structure').addClass(id); }); module("dynamic webshim / css load"); var supportPlaceholder = ('placeholder' in document.createElement('input')); asyncTest("dynamic webshim Modul", function(){ var testElem = $('<div />').appendTo('body'); var testStructure = '<div id="webshim-structure"><section><hgroup><input type="password" placeholder="hello" /></hgroup></section><section></section></div>'; var structureTest = function(fnName){ var elemsLength = (!supportPlaceholder) ? 6 : 4; equals( $('#webshim-structure > *').length, 2, 'structure has two childs with method '+ fnName ); equals( $('#webshim-structure *').length, elemsLength, 'structure has 4 descendants with method '+ fnName ); ok($('#webshim-structure').hasClass(id), "structure has addready test-class "+ fnName); $('#webshim-structure input').remove(); ok($('#webshim-structure').html().indexOf('/>') === -1, 'html5 structure is parsed correctly'); $('#webshim-structure').remove(); }; testElem.afterPolyfill(testStructure); structureTest('afterPolyfill'); testElem.htmlPolyfill(testStructure); structureTest('htmlPolyfill'); $(testStructure).insertPolyfillAfter(testElem); structureTest('afterPolyfill'); testElem.remove(); $.webshims.ready('DOM forms', function(){ start(); }); }); })(jQuery);
Version data entries
31 entries across 31 versions & 1 rubygems