Skip to content Skip to sidebar Skip to footer

Javascript Runtime Error: Unable To Set Property 'webkit' Of Undefined Or Null Reference

I am working on asp.net and of course javascripts in front end. I searched on Google but couldn't find the similar issue about 'webkit', BTW, I am using IE. I tried to debug on ch

Solution 1:

It's trying to determine whether or not you're using a webkit browser by checking the webkit property of the browser object. Unfortunately, that object was removed in more recent versions of jQuery as it's recommended to check for browser features, rather than browser type.

This will get rid of the error message, but will assume all browsers are not webkit browsers...

if (typeof ($.browser) == "undefined") {
    $.browser = {};
}
if (typeof ($.browser.webkit) == "undefined") {
    $.browser.webkit = false;
}

You'll need it after jQuery is included, but before whatever you're calling that's causing the error. It will probably suffice to put it at the top of your own first included script.

Post a Comment for "Javascript Runtime Error: Unable To Set Property 'webkit' Of Undefined Or Null Reference"