'How to encapsulate webview from host frame?

I am using a webview to encapsulate the content from the host view. Since the webview points to the same domain as the host frame I have access to cookies, localStorage and more.

Is there a way to have a webview that has no access to any information of the host frame?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source