while I was checking some code in a website I came with this question.
In the body tag it was written ondragstart="return false" and ondrop="return false", by looking at it, I understood that they prevented their website images and links from dragging and dropping. However, I have also done some research and found that this can also be achieved by directly writing draggable="false". I am confused with these attributes now. Can anyone explain them in a simple way? Kindly, Let me know if I did any mistakes in my question, I'll keep them in mind when asking other questions. Thanks in advance :)
<body ondragstart="return false;" ondrop="return false;">
This is the code that I have seen in the website. Take a look at it.
As far as I know, ondragstart and ondrop are events. Draggable is a property which can be set to 'true' at later stage in the code. Having implemented this feature in the events ensures that mouse drag cannot be set to true further in the code, unless those event are un-binded.