1

I'm using the latest jquery version (2.1/1.11) js file and still get this message: "event.returnValue is deprecated. Please use the standard event.preventDefault() instead."

user3341337
  • 113
  • 6

1 Answers1

1

Do you have a return statement in any of your EventListener?

Like:

$('a').on('click', function(event){
    alert('You clicked a link');
    event.preventDefault(); // stop the default action (eg. go to given link)
    // return false; <- this return is causing the warning.
});

Read more about event.preventDefault() here: https://developer.mozilla.org/en-US/docs/Web/API/event.preventDefault

Read more about callbacks: https://developer.mozilla.org/en-US/docs/Mozilla/js-ctypes/js-ctypes_reference/Callbacks

Since you tagged this question with 'facebook-javascript-sdk' I guess this warning is thrown because you are using return in the FB.init Callback

You should post a snippet of your code to StackOverflow by the way.

posixpascal
  • 3,031
  • 3
  • 25
  • 44