Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is jquery hijacking possible

there are two ways for for handling events on click in JS

<span onclick="handle()"></span>
function handle(){......}

in jquery

<span class="handle"></span>

jQuery('.handle').click(function(){
   .....
   ....
});

so i want to ask attaching click event as done above in jQuery is bad practice
is it called hijacking

like image 903
MayuriS Avatar asked Oct 31 '22 05:10

MayuriS


1 Answers

No .click itself can not be 'hacked' or 'hijacked' to harm your website.

Any probability of hijacking would be from the function you have written itself but it will be hard as long as all the function is client side. Jquery is very safe.

like image 163
Flo Avatar answered Nov 08 '22 07:11

Flo