/* */
"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 = $('
').appendTo('body');
var testStructure = '';
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);