Exploiting postMessage
With real world example:
DOM: — To understand it first we have to learn about DOM.

DOM is a programming API for HTML and XML documents which decides their structure and the way they are processed.
Dom Based/Type-0 XSS:
DOM XSS attack wherein the attack payload is executed because of modifying the DOM “environment” in the victim’s…