So, I want to resize the client side of an image like this, but not only in Firefox.

Note that the element generated in Firefox has the attribute _moz_resizing = "true" .

The code is as simple as the following.
document.querySelector('p').contentEditable = true;
<p> <img src='http://cdn.sstatic.net/Sites/stackoverflow/img/apple-touch-icon.png' alt='stackoverflow icon'> </p>
Is there a way to do this for Chrome and Edge? . I am going to provide a solution in JavaScript, I would like it if it were vanilla.js than jQuery. Thank you in advance.
source share