We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8d44776 + 3349288 commit a4b127bCopy full SHA for a4b127b
general-patterns/shim-sniffing.html
@@ -45,7 +45,7 @@
45
46
// a reusable shim() function
47
functionshim(o,prop,fn){
48
-varnbody="function"+prop+"(){nativecode]}";
+varnbody="function"+prop+"(){[nativecode]}";
49
if(o.hasOwnProperty(prop)&&
50
o[prop].toString().replace(/\s/g,'')===nbody){
51
// native!
@@ -73,4 +73,4 @@
73
// http://www.jspatterns.com/shim-sniffing/
74
</script>
75
</body>
76
-</html>
+</html>
0 commit comments