I will like to create a kind of proxy that logs every time a cookie is created using javascript. But I don't know if it could be created overriding the prototype or how to do it in the best way.
For example, considering this code in a website:
document.cookie = "test=myvalue;domain=test";
I will like to log in the console the Name and value of the created cookie. But I will not like to check it using the document.cookie to return all cookies and print the name and value, I want to do it in a dynamic way.
May it be possible to do it with the prototype?
Thanks in advance
Via Active questions tagged javascript - Stack Overflow https://ift.tt/p1DRAJs
Comments
Post a Comment