webshims-rails 0.4.2 → 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. data/lib/webshims-rails/version.rb +2 -2
  2. data/vendor/assets/javascripts/webshims/minified/polyfiller.js +30 -29
  3. data/vendor/assets/javascripts/webshims/minified/shims/combos/1.js +12 -12
  4. data/vendor/assets/javascripts/webshims/minified/shims/combos/10.js +76 -76
  5. data/vendor/assets/javascripts/webshims/minified/shims/combos/11.js +12 -12
  6. data/vendor/assets/javascripts/webshims/minified/shims/combos/12.js +12 -12
  7. data/vendor/assets/javascripts/webshims/minified/shims/combos/13.js +27 -27
  8. data/vendor/assets/javascripts/webshims/minified/shims/combos/16.js +12 -12
  9. data/vendor/assets/javascripts/webshims/minified/shims/combos/17.js +14 -14
  10. data/vendor/assets/javascripts/webshims/minified/shims/combos/18.js +63 -60
  11. data/vendor/assets/javascripts/webshims/minified/shims/combos/19.js +59 -59
  12. data/vendor/assets/javascripts/webshims/minified/shims/combos/20.js +1 -1
  13. data/vendor/assets/javascripts/webshims/minified/shims/combos/22.js +1 -1
  14. data/vendor/assets/javascripts/webshims/minified/shims/combos/24.js +67 -67
  15. data/vendor/assets/javascripts/webshims/minified/shims/combos/25.js +59 -58
  16. data/vendor/assets/javascripts/webshims/minified/shims/combos/26.js +81 -80
  17. data/vendor/assets/javascripts/webshims/minified/shims/combos/27.js +103 -102
  18. data/vendor/assets/javascripts/webshims/minified/shims/combos/6.js +34 -31
  19. data/vendor/assets/javascripts/webshims/minified/shims/combos/7.js +41 -38
  20. data/vendor/assets/javascripts/webshims/minified/shims/combos/8.js +35 -35
  21. data/vendor/assets/javascripts/webshims/minified/shims/combos/9.js +67 -67
  22. data/vendor/assets/javascripts/webshims/minified/shims/dom-extend.js +17 -17
  23. data/vendor/assets/javascripts/webshims/minified/shims/form-number-date-api.js +10 -8
  24. data/vendor/assets/javascripts/webshims/minified/shims/form-number-date-ui.js +24 -23
  25. data/vendor/assets/javascripts/webshims/minified/shims/mediaelement-swf.js +1 -1
  26. data/vendor/assets/javascripts/webshims/minified/shims/styles/shim.css +9 -0
  27. data/vendor/assets/javascripts/webshims/minified/shims/track-ui.js +9 -9
  28. data/vendor/assets/javascripts/webshims/minified/shims/track.js +21 -20
  29. data/vendor/assets/javascripts/webshims/polyfiller.js +144 -140
  30. data/vendor/assets/javascripts/webshims/shims/combos/1.js +10 -6
  31. data/vendor/assets/javascripts/webshims/shims/combos/10.js +11 -7
  32. data/vendor/assets/javascripts/webshims/shims/combos/11.js +10 -6
  33. data/vendor/assets/javascripts/webshims/shims/combos/12.js +10 -6
  34. data/vendor/assets/javascripts/webshims/shims/combos/13.js +10 -6
  35. data/vendor/assets/javascripts/webshims/shims/combos/16.js +10 -6
  36. data/vendor/assets/javascripts/webshims/shims/combos/17.js +10 -6
  37. data/vendor/assets/javascripts/webshims/shims/combos/18.js +986 -924
  38. data/vendor/assets/javascripts/webshims/shims/combos/19.js +10 -6
  39. data/vendor/assets/javascripts/webshims/shims/combos/20.js +1 -1
  40. data/vendor/assets/javascripts/webshims/shims/combos/22.js +1 -1
  41. data/vendor/assets/javascripts/webshims/shims/combos/24.js +10 -6
  42. data/vendor/assets/javascripts/webshims/shims/combos/25.js +820 -768
  43. data/vendor/assets/javascripts/webshims/shims/combos/26.js +820 -768
  44. data/vendor/assets/javascripts/webshims/shims/combos/27.js +821 -769
  45. data/vendor/assets/javascripts/webshims/shims/combos/6.js +986 -924
  46. data/vendor/assets/javascripts/webshims/shims/combos/7.js +986 -924
  47. data/vendor/assets/javascripts/webshims/shims/combos/8.js +10 -6
  48. data/vendor/assets/javascripts/webshims/shims/combos/9.js +11 -7
  49. data/vendor/assets/javascripts/webshims/shims/dom-extend.js +10 -6
  50. data/vendor/assets/javascripts/webshims/shims/form-number-date-api.js +77 -77
  51. data/vendor/assets/javascripts/webshims/shims/form-number-date-ui.js +909 -847
  52. data/vendor/assets/javascripts/webshims/shims/mediaelement-swf.js +1 -1
  53. data/vendor/assets/javascripts/webshims/shims/styles/shim.css +9 -0
  54. data/vendor/assets/javascripts/webshims/shims/track-ui.js +300 -291
  55. data/vendor/assets/javascripts/webshims/shims/track.js +810 -762
  56. metadata +10 -5
@@ -19,17 +19,24 @@
19
19
  var browserVersion = parseFloat($.browser.version, 10);
20
20
  var Object = window.Object;
21
21
  var html5 = window.html5 || {};
22
-
23
- Modernizr.genericDOM = !!($('<video><div></div></video>')[0].innerHTML);
22
+ var needModernizr = function(tests, fn){
23
+ var run = true;
24
+ $.each(tests.split(' '), function(i, name){
25
+ if(!(name in Modernizr)){
26
+ webshims.error('webshims needs Modernizr.'+name + ' to implement feature.');
27
+ run = false;
28
+ }
29
+ });
30
+ if(run && fn){
31
+ fn();
32
+ }
33
+ };
24
34
 
25
35
  Modernizr.advancedObjectProperties = Modernizr.objectAccessor = Modernizr.ES5 = !!('create' in Object && 'seal' in Object);
26
-
27
- if($.browser.chrome){
28
- $.browser.webkit = true;
29
- }
36
+
30
37
 
31
38
  var webshims = {
32
- version: '1.9.1',
39
+ version: '1.9.2',
33
40
  cfg: {
34
41
  useImportantStyles: true,
35
42
  //addCacheBuster: false,
@@ -87,7 +94,7 @@
87
94
  var onReadyEvts = features;
88
95
  var timer;
89
96
 
90
- if(webCFG.disableShivMethods && Modernizr.genericDOM && 'html5Clone' in $.support){
97
+ if(webCFG.disableShivMethods){
91
98
  html5.shivMethods = false;
92
99
  }
93
100
 
@@ -97,11 +104,13 @@
97
104
  clearTimeout(timer);
98
105
  };
99
106
 
100
- addClass.push('loading-polyfills');
101
107
  $(window).bind('load.lP error.lP', removeLoader);
108
+
109
+ addClass.push('loading-polyfills');
102
110
  timer = setTimeout(function(){
103
111
  $('html').addClass('long-loading-polyfills');
104
112
  }, 600);
113
+
105
114
  if (webCFG.waitReady && $.isReady) {
106
115
  webshims.warn('Call webshims.polyfill before DOM-Ready or set waitReady to false.');
107
116
  }
@@ -145,7 +154,7 @@
145
154
 
146
155
  $.each(features, function(i, feature){
147
156
  if(!webshimsFeatures[feature]){
148
- webshims.warn("could not find webshims-feature (aborted): "+ feature);
157
+ webshims.error("could not find webshims-feature (aborted): "+ feature);
149
158
  isReady(feature, true);
150
159
  return;
151
160
  }
@@ -522,6 +531,7 @@
522
531
  var loader = webshims.loader;
523
532
  var loadList = loader.loadList;
524
533
  var addModule = loader.addModule;
534
+ var bugs = webshims.bugs;
525
535
  var removeCombos = [];
526
536
  var importantLogs = {
527
537
  warn: 1,
@@ -637,6 +647,7 @@
637
647
  }, 9999);
638
648
  });
639
649
  $(window).load(function(){
650
+ $.isDOMReady = true;
640
651
  isReady('DOM', true);
641
652
  isReady('WINDOWLOAD', true);
642
653
  });
@@ -837,100 +848,94 @@
837
848
 
838
849
 
839
850
  //<localstorage combos: 14
840
- if('localstorage' in Modernizr) {
841
- addPolyfill('json-storage', {
842
- test: Modernizr.localstorage && 'sessionStorage' in window && 'JSON' in window,
843
- loadInit: function(){
844
- loadList(['swfobject']);
845
- },
846
- noAutoCallback: true,
847
- c: [14]
848
- });
849
- }
851
+ needModernizr('localstorage');
852
+ addPolyfill('json-storage', {
853
+ test: Modernizr.localstorage && 'sessionStorage' in window && 'JSON' in window,
854
+ loadInit: function(){
855
+ loadList(['swfobject']);
856
+ },
857
+ noAutoCallback: true,
858
+ c: [14]
859
+ });
850
860
  //>localstorage
851
861
 
852
862
 
853
863
  //<geolocation combos: 14,15
854
- if('geolocation' in Modernizr){
855
- addPolyfill('geolocation', {
856
- test: Modernizr.geolocation,
857
- options: {
858
- destroyWrite: true
859
- // ,confirmText: ''
860
- },
861
- d: ['json-storage'],
862
- c: [14, 15]
863
- });
864
- }
864
+ needModernizr('geolocation');
865
+ addPolyfill('geolocation', {
866
+ test: Modernizr.geolocation,
867
+ options: {
868
+ destroyWrite: true
869
+ // ,confirmText: ''
870
+ },
871
+ d: ['json-storage'],
872
+ c: [14, 15]
873
+ });
865
874
  //>
866
875
 
867
876
  //<canvas
868
- (function(){
869
- if('canvas' in Modernizr) {
870
- var flashCanvas;
871
- addPolyfill('canvas', {
872
- src: 'excanvas',
873
- test: Modernizr.canvas,
874
- options: {type: 'flash'}, //excanvas | flash | flashpro
875
- noAutoCallback: true,
876
- loadInit: function(){
877
- var type = this.options.type;
878
- var src;
879
- if(type && type.indexOf('flash') !== -1 && (!window.swfobject || swfobject.hasFlashPlayerVersion('9.0.0'))){
880
- window.FlashCanvasOptions = window.FlashCanvasOptions || {};
881
- flashCanvas = FlashCanvasOptions;
882
- if(type == 'flash'){
883
- $.extend(flashCanvas, {
884
- swfPath: webCFG.basePath + 'FlashCanvas/'
885
- });
886
- this.src = 'FlashCanvas/flashcanvas';
887
- src = flashCanvas.swfPath + 'flashcanvas.swf';
888
- } else {
889
- $.extend(flashCanvas, {swfPath: webCFG.basePath + 'FlashCanvasPro/'});
890
- this.src = 'FlashCanvasPro/flashcanvas';
891
- //assume, that the user has flash10+
892
- src = flashCanvas.swfPath + 'flash10canvas.swf';
893
- }
894
- //todo: implement cachbuster for flashcanvas
895
- // if(webCFG.addCacheBuster){
896
- // src += webCFG.addCacheBuster;
897
- // }
877
+ needModernizr('canvas', function(){
878
+ var flashCanvas;
879
+ addPolyfill('canvas', {
880
+ src: 'excanvas',
881
+ test: Modernizr.canvas,
882
+ options: {type: 'flash'}, //excanvas | flash | flashpro
883
+ noAutoCallback: true,
884
+ loadInit: function(){
885
+ var type = this.options.type;
886
+ var src;
887
+ if(type && type.indexOf('flash') !== -1 && (!window.swfobject || swfobject.hasFlashPlayerVersion('9.0.0'))){
888
+ window.FlashCanvasOptions = window.FlashCanvasOptions || {};
889
+ flashCanvas = FlashCanvasOptions;
890
+ if(type == 'flash'){
891
+ $.extend(flashCanvas, {
892
+ swfPath: webCFG.basePath + 'FlashCanvas/'
893
+ });
894
+ this.src = 'FlashCanvas/flashcanvas';
895
+ src = flashCanvas.swfPath + 'flashcanvas.swf';
896
+ } else {
897
+ $.extend(flashCanvas, {swfPath: webCFG.basePath + 'FlashCanvasPro/'});
898
+ this.src = 'FlashCanvasPro/flashcanvas';
899
+ //assume, that the user has flash10+
900
+ src = flashCanvas.swfPath + 'flash10canvas.swf';
898
901
  }
899
- },
900
- afterLoad: function(){
901
- webshims.addReady(function(context, elem){
902
- if(context == document){
903
- if(window.G_vmlCanvasManager && G_vmlCanvasManager.init_ ){
904
- G_vmlCanvasManager.init_(document);
905
- }
902
+ //todo: implement cachbuster for flashcanvas
903
+ // if(webCFG.addCacheBuster){
904
+ // src += webCFG.addCacheBuster;
905
+ // }
906
+ }
907
+ },
908
+ afterLoad: function(){
909
+ webshims.addReady(function(context, elem){
910
+ if(context == document){
911
+ if(window.G_vmlCanvasManager && G_vmlCanvasManager.init_ ){
912
+ G_vmlCanvasManager.init_(document);
906
913
  }
907
- $('canvas', context).add(elem.filter('canvas')).each(function(){
908
- var hasContext = this.getContext;
909
- if(!hasContext && window.G_vmlCanvasManager){
910
- G_vmlCanvasManager.initElement(this);
911
- }
912
- });
913
- if(context == document){
914
- isReady('canvas', true);
914
+ }
915
+ $('canvas', context).add(elem.filter('canvas')).each(function(){
916
+ var hasContext = this.getContext;
917
+ if(!hasContext && window.G_vmlCanvasManager){
918
+ G_vmlCanvasManager.initElement(this);
915
919
  }
916
920
  });
917
- },
918
- methodNames: ['getContext'],
919
- d: [DOMSUPPORT]
920
- });
921
- }
922
- })();
921
+ if(context == document){
922
+ isReady('canvas', true);
923
+ }
924
+ });
925
+ },
926
+ methodNames: ['getContext'],
927
+ d: [DOMSUPPORT]
928
+ });
929
+ });
923
930
  //>
924
931
 
925
932
 
926
933
  //<forms combos: 3, 2, 59, 17, 16, 5, 4, 24, 19, 18, 7, 59, 5, 21, 11, 23, 26
927
- var modernizrInputAttrs = Modernizr.input;
928
- var modernizrInputTypes = Modernizr.inputtypes;
929
-
930
- if(modernizrInputAttrs && modernizrInputTypes){
934
+ needModernizr('input inputtypes', function(){
935
+ var modernizrInputAttrs = Modernizr.input;
936
+ var modernizrInputTypes = Modernizr.inputtypes;
931
937
  var formvalidation = 'formvalidation';
932
938
  var formOptions;
933
- var bugs = webshims.bugs;
934
939
  var select = $('<select required="" name="a"><option disabled="" /></select>')[0];
935
940
  addTest(formvalidation, function(){
936
941
  return !!(modernizrInputAttrs.required && modernizrInputAttrs.pattern);
@@ -1020,7 +1025,7 @@
1020
1025
 
1021
1026
  addPolyfill('form-number-date-api', {
1022
1027
  f: 'forms-ext',
1023
- uiTest: function(){return (modernizrInputTypes.range && modernizrInputTypes.date /*&& modernizrInputTypes.time*/ && modernizrInputTypes.number);},
1028
+ uiTest: function(){return (modernizrInputTypes.range && modernizrInputTypes.date && modernizrInputTypes.time && modernizrInputTypes.number);},
1024
1029
  test: function(toLoad){
1025
1030
  return (this.uiTest() && !webshims.bugs.valueAsNumberSet);
1026
1031
  },
@@ -1058,7 +1063,7 @@
1058
1063
  d: ['form-core', DOMSUPPORT],
1059
1064
  c: [3, 59, 18, 24, 19, 11]
1060
1065
  });
1061
- }
1066
+ });
1062
1067
  //>
1063
1068
 
1064
1069
  //<details combos: 12,13,15
@@ -1079,58 +1084,57 @@
1079
1084
  //>
1080
1085
 
1081
1086
  //<mediaelement combos: 10, 9, 12, 17, 16, 8, 20, 22, 23, 24, 25, 26, 27
1082
- if ('audio' in Modernizr && 'video' in Modernizr && 'texttrackapi' in Modernizr){
1083
- webshims.mediaelement = {};
1084
-
1085
- addPolyfill('mediaelement-core', {
1086
- f: 'mediaelement',
1087
- noAutoCallback: true,
1088
-
1089
- d: ['swfobject',DOMSUPPORT],
1090
- c: [27, 10, 9, 12, 17, 26, 16, 25, 8, 22, 23, 24, 20]
1091
- });
1092
- addPolyfill('mediaelement-swf', {
1093
- f: 'mediaelement',
1094
- options: {
1095
- hasToPlay: 'any',
1096
- preferFlash: false,
1097
- jwVars: {},
1098
- jwParams: {},
1099
- jwAttrs: {},
1100
- changeJW: $.noop
1101
- },
1102
- methodNames: ['play', 'pause', 'canPlayType', 'mediaLoad:load'],
1103
- d: ['swfobject', DOMSUPPORT],
1104
- test: function(){
1105
- if(!Modernizr.audio || !Modernizr.video){
1106
- return false;
1107
- }
1108
- var options = this.options;
1109
- var hasToPlay = options.hasToPlay;
1110
- return !( (!window.swfobject || window.swfobject.hasFlashPlayerVersion('9.0.115')) && (options.preferFlash || (hasToPlay != 'any' && !Modernizr.video[hasToPlay] && !Modernizr.audio[hasToPlay])));
1111
- },
1112
- c: [27, 10, 9, 22, 20]
1113
- });
1114
-
1115
- bugs.track = (Modernizr.track && (!Modernizr.texttrackapi || typeof (document.createElement('track').track || {}).mode != 'string'));
1116
-
1117
- addPolyfill('track', {
1118
- options: {
1119
- positionDisplay: true,
1120
- override: bugs.track
1121
- },
1122
- test: function(){
1123
- return Modernizr.track && !this.options.override && !bugs.track;
1124
- },
1125
- d: ['mediaelement', DOMSUPPORT],
1126
- methodNames: ['addTextTrack'],
1127
- c: [27, 26, 25]
1128
- });
1087
+ needModernizr('audio video texttrackapi');
1088
+ webshims.mediaelement = {};
1089
+
1090
+ addPolyfill('mediaelement-core', {
1091
+ f: 'mediaelement',
1092
+ noAutoCallback: true,
1129
1093
 
1130
- addModule('track-ui', {
1131
- d: ['track']
1132
- });
1133
- }
1094
+ d: ['swfobject', DOMSUPPORT],
1095
+ c: [27, 10, 9, 12, 17, 26, 16, 25, 8, 22, 23, 24, 20]
1096
+ });
1097
+ addPolyfill('mediaelement-swf', {
1098
+ f: 'mediaelement',
1099
+ options: {
1100
+ hasToPlay: 'any',
1101
+ preferFlash: false,
1102
+ jwVars: {},
1103
+ jwParams: {},
1104
+ jwAttrs: {},
1105
+ changeJW: $.noop
1106
+ },
1107
+ methodNames: ['play', 'pause', 'canPlayType', 'mediaLoad:load'],
1108
+ d: ['swfobject', DOMSUPPORT],
1109
+ test: function(){
1110
+ if(!Modernizr.audio || !Modernizr.video){
1111
+ return false;
1112
+ }
1113
+ var options = this.options;
1114
+ var hasToPlay = options.hasToPlay;
1115
+ return !( (!window.swfobject || window.swfobject.hasFlashPlayerVersion('9.0.115')) && (options.preferFlash || (hasToPlay != 'any' && !Modernizr.video[hasToPlay] && !Modernizr.audio[hasToPlay])));
1116
+ },
1117
+ c: [27, 10, 9, 22, 20]
1118
+ });
1119
+
1120
+ bugs.track = (Modernizr.track && (!Modernizr.texttrackapi || typeof (document.createElement('track').track || {}).mode != 'string'));
1121
+
1122
+ addPolyfill('track', {
1123
+ options: {
1124
+ positionDisplay: true,
1125
+ override: bugs.track
1126
+ },
1127
+ test: function(){
1128
+ return Modernizr.track && !this.options.override && !bugs.track;
1129
+ },
1130
+ d: ['mediaelement', DOMSUPPORT],
1131
+ methodNames: ['addTextTrack'],
1132
+ c: [27, 26, 25]
1133
+ });
1134
+
1135
+ addModule('track-ui', {
1136
+ d: ['track']
1137
+ });
1134
1138
  //>
1135
1139
 
1136
1140
 
@@ -1190,7 +1190,7 @@ jQuery.webshims.register('dom-extend', function($, webshims, window, document, u
1190
1190
  var docObserve = {
1191
1191
  init: false,
1192
1192
  start: function(){
1193
- if(!this.init){
1193
+ if(!this.init && document.body){
1194
1194
  this.init = true;
1195
1195
  this.height = $(document).height();
1196
1196
  this.width = $(document).width();
@@ -1202,7 +1202,7 @@ jQuery.webshims.register('dom-extend', function($, webshims, window, document, u
1202
1202
  docObserve.width = width;
1203
1203
  handler({type: 'docresize'});
1204
1204
  }
1205
- }, 400);
1205
+ }, 600);
1206
1206
  }
1207
1207
  }
1208
1208
  };
@@ -1218,8 +1218,10 @@ jQuery.webshims.register('dom-extend', function($, webshims, window, document, u
1218
1218
  }
1219
1219
  lastHeight = height;
1220
1220
  lastWidth = width;
1221
- docObserve.height = $(document).height();
1222
- docObserve.width = $(document).width();
1221
+ if(document.body){
1222
+ docObserve.height = $(document).height();
1223
+ docObserve.width = $(document).width();
1224
+ }
1223
1225
  }
1224
1226
  $.event.trigger('updateshadowdom');
1225
1227
  }, 40);
@@ -1265,7 +1267,9 @@ jQuery.webshims.register('dom-extend', function($, webshims, window, document, u
1265
1267
  shadowFocusElementData.shadowData.data = shadowData.shadowData.data = nativeData.shadowData.data = opts.data;
1266
1268
  }
1267
1269
  opts = null;
1268
- docObserve.start();
1270
+ webshims.ready('DOM', function(){
1271
+ docObserve.start();
1272
+ });
1269
1273
  }
1270
1274
  })(),
1271
1275
  propTypes: {
@@ -1409,7 +1413,7 @@ jQuery.webshims.register('dom-extend', function($, webshims, window, document, u
1409
1413
  }
1410
1414
  if(propType){
1411
1415
  if(descs[prop][propType]){
1412
- webshims.log('override: '+ name +'['+prop +'] for '+ propType);
1416
+ //webshims.log('override: '+ name +'['+prop +'] for '+ propType);
1413
1417
  } else {
1414
1418
  descs[prop][propType] = {};
1415
1419
  ['value', 'set', 'get'].forEach(function(copyProp){
@@ -1190,7 +1190,7 @@ jQuery.webshims.register('dom-extend', function($, webshims, window, document, u
1190
1190
  var docObserve = {
1191
1191
  init: false,
1192
1192
  start: function(){
1193
- if(!this.init){
1193
+ if(!this.init && document.body){
1194
1194
  this.init = true;
1195
1195
  this.height = $(document).height();
1196
1196
  this.width = $(document).width();
@@ -1202,7 +1202,7 @@ jQuery.webshims.register('dom-extend', function($, webshims, window, document, u
1202
1202
  docObserve.width = width;
1203
1203
  handler({type: 'docresize'});
1204
1204
  }
1205
- }, 400);
1205
+ }, 600);
1206
1206
  }
1207
1207
  }
1208
1208
  };
@@ -1218,8 +1218,10 @@ jQuery.webshims.register('dom-extend', function($, webshims, window, document, u
1218
1218
  }
1219
1219
  lastHeight = height;
1220
1220
  lastWidth = width;
1221
- docObserve.height = $(document).height();
1222
- docObserve.width = $(document).width();
1221
+ if(document.body){
1222
+ docObserve.height = $(document).height();
1223
+ docObserve.width = $(document).width();
1224
+ }
1223
1225
  }
1224
1226
  $.event.trigger('updateshadowdom');
1225
1227
  }, 40);
@@ -1265,7 +1267,9 @@ jQuery.webshims.register('dom-extend', function($, webshims, window, document, u
1265
1267
  shadowFocusElementData.shadowData.data = shadowData.shadowData.data = nativeData.shadowData.data = opts.data;
1266
1268
  }
1267
1269
  opts = null;
1268
- docObserve.start();
1270
+ webshims.ready('DOM', function(){
1271
+ docObserve.start();
1272
+ });
1269
1273
  }
1270
1274
  })(),
1271
1275
  propTypes: {
@@ -1409,7 +1413,7 @@ jQuery.webshims.register('dom-extend', function($, webshims, window, document, u
1409
1413
  }
1410
1414
  if(propType){
1411
1415
  if(descs[prop][propType]){
1412
- webshims.log('override: '+ name +'['+prop +'] for '+ propType);
1416
+ //webshims.log('override: '+ name +'['+prop +'] for '+ propType);
1413
1417
  } else {
1414
1418
  descs[prop][propType] = {};
1415
1419
  ['value', 'set', 'get'].forEach(function(copyProp){
@@ -3054,7 +3058,7 @@ jQuery.webshims.register('mediaelement-swf', function($, webshims, window, docum
3054
3058
  if(flash[0].offsetWidth > 1 && flash[0].offsetHeight > 1 && location.protocol.indexOf('file:') === 0){
3055
3059
  webshims.error("Add your local development-directory to the local-trusted security sandbox: http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html");
3056
3060
  } else if(flash[0].offsetWidth < 2 || flash[0].offsetHeight < 2) {
3057
- webshims.info("JS-SWF connection can't be established on hidden or unconnected flash objects");
3061
+ webshims.warn("JS-SWF connection can't be established on hidden or unconnected flash objects");
3058
3062
  }
3059
3063
  flash = null;
3060
3064
  }, 8000);
@@ -388,7 +388,7 @@ jQuery.webshims.register('dom-extend', function($, webshims, window, document, u
388
388
  var docObserve = {
389
389
  init: false,
390
390
  start: function(){
391
- if(!this.init){
391
+ if(!this.init && document.body){
392
392
  this.init = true;
393
393
  this.height = $(document).height();
394
394
  this.width = $(document).width();
@@ -400,7 +400,7 @@ jQuery.webshims.register('dom-extend', function($, webshims, window, document, u
400
400
  docObserve.width = width;
401
401
  handler({type: 'docresize'});
402
402
  }
403
- }, 400);
403
+ }, 600);
404
404
  }
405
405
  }
406
406
  };
@@ -416,8 +416,10 @@ jQuery.webshims.register('dom-extend', function($, webshims, window, document, u
416
416
  }
417
417
  lastHeight = height;
418
418
  lastWidth = width;
419
- docObserve.height = $(document).height();
420
- docObserve.width = $(document).width();
419
+ if(document.body){
420
+ docObserve.height = $(document).height();
421
+ docObserve.width = $(document).width();
422
+ }
421
423
  }
422
424
  $.event.trigger('updateshadowdom');
423
425
  }, 40);
@@ -463,7 +465,9 @@ jQuery.webshims.register('dom-extend', function($, webshims, window, document, u
463
465
  shadowFocusElementData.shadowData.data = shadowData.shadowData.data = nativeData.shadowData.data = opts.data;
464
466
  }
465
467
  opts = null;
466
- docObserve.start();
468
+ webshims.ready('DOM', function(){
469
+ docObserve.start();
470
+ });
467
471
  }
468
472
  })(),
469
473
  propTypes: {
@@ -607,7 +611,7 @@ jQuery.webshims.register('dom-extend', function($, webshims, window, document, u
607
611
  }
608
612
  if(propType){
609
613
  if(descs[prop][propType]){
610
- webshims.log('override: '+ name +'['+prop +'] for '+ propType);
614
+ //webshims.log('override: '+ name +'['+prop +'] for '+ propType);
611
615
  } else {
612
616
  descs[prop][propType] = {};
613
617
  ['value', 'set', 'get'].forEach(function(copyProp){
@@ -388,7 +388,7 @@ jQuery.webshims.register('dom-extend', function($, webshims, window, document, u
388
388
  var docObserve = {
389
389
  init: false,
390
390
  start: function(){
391
- if(!this.init){
391
+ if(!this.init && document.body){
392
392
  this.init = true;
393
393
  this.height = $(document).height();
394
394
  this.width = $(document).width();
@@ -400,7 +400,7 @@ jQuery.webshims.register('dom-extend', function($, webshims, window, document, u
400
400
  docObserve.width = width;
401
401
  handler({type: 'docresize'});
402
402
  }
403
- }, 400);
403
+ }, 600);
404
404
  }
405
405
  }
406
406
  };
@@ -416,8 +416,10 @@ jQuery.webshims.register('dom-extend', function($, webshims, window, document, u
416
416
  }
417
417
  lastHeight = height;
418
418
  lastWidth = width;
419
- docObserve.height = $(document).height();
420
- docObserve.width = $(document).width();
419
+ if(document.body){
420
+ docObserve.height = $(document).height();
421
+ docObserve.width = $(document).width();
422
+ }
421
423
  }
422
424
  $.event.trigger('updateshadowdom');
423
425
  }, 40);
@@ -463,7 +465,9 @@ jQuery.webshims.register('dom-extend', function($, webshims, window, document, u
463
465
  shadowFocusElementData.shadowData.data = shadowData.shadowData.data = nativeData.shadowData.data = opts.data;
464
466
  }
465
467
  opts = null;
466
- docObserve.start();
468
+ webshims.ready('DOM', function(){
469
+ docObserve.start();
470
+ });
467
471
  }
468
472
  })(),
469
473
  propTypes: {
@@ -607,7 +611,7 @@ jQuery.webshims.register('dom-extend', function($, webshims, window, document, u
607
611
  }
608
612
  if(propType){
609
613
  if(descs[prop][propType]){
610
- webshims.log('override: '+ name +'['+prop +'] for '+ propType);
614
+ //webshims.log('override: '+ name +'['+prop +'] for '+ propType);
611
615
  } else {
612
616
  descs[prop][propType] = {};
613
617
  ['value', 'set', 'get'].forEach(function(copyProp){
@@ -388,7 +388,7 @@ jQuery.webshims.register('dom-extend', function($, webshims, window, document, u
388
388
  var docObserve = {
389
389
  init: false,
390
390
  start: function(){
391
- if(!this.init){
391
+ if(!this.init && document.body){
392
392
  this.init = true;
393
393
  this.height = $(document).height();
394
394
  this.width = $(document).width();
@@ -400,7 +400,7 @@ jQuery.webshims.register('dom-extend', function($, webshims, window, document, u
400
400
  docObserve.width = width;
401
401
  handler({type: 'docresize'});
402
402
  }
403
- }, 400);
403
+ }, 600);
404
404
  }
405
405
  }
406
406
  };
@@ -416,8 +416,10 @@ jQuery.webshims.register('dom-extend', function($, webshims, window, document, u
416
416
  }
417
417
  lastHeight = height;
418
418
  lastWidth = width;
419
- docObserve.height = $(document).height();
420
- docObserve.width = $(document).width();
419
+ if(document.body){
420
+ docObserve.height = $(document).height();
421
+ docObserve.width = $(document).width();
422
+ }
421
423
  }
422
424
  $.event.trigger('updateshadowdom');
423
425
  }, 40);
@@ -463,7 +465,9 @@ jQuery.webshims.register('dom-extend', function($, webshims, window, document, u
463
465
  shadowFocusElementData.shadowData.data = shadowData.shadowData.data = nativeData.shadowData.data = opts.data;
464
466
  }
465
467
  opts = null;
466
- docObserve.start();
468
+ webshims.ready('DOM', function(){
469
+ docObserve.start();
470
+ });
467
471
  }
468
472
  })(),
469
473
  propTypes: {
@@ -607,7 +611,7 @@ jQuery.webshims.register('dom-extend', function($, webshims, window, document, u
607
611
  }
608
612
  if(propType){
609
613
  if(descs[prop][propType]){
610
- webshims.log('override: '+ name +'['+prop +'] for '+ propType);
614
+ //webshims.log('override: '+ name +'['+prop +'] for '+ propType);
611
615
  } else {
612
616
  descs[prop][propType] = {};
613
617
  ['value', 'set', 'get'].forEach(function(copyProp){