I having some in house ad serving that serve html5 ads each ad contain its own css js and html.
i cant just put them in iframe because the website is based a lot of touch gesture and touch not working over iframe.
I can put pointer-events: none;
over the iframe but then the ads won't be intractable.
so is there some special way of creating isolated chunk of code like iframe without iframes?
example:
<div class="website">
<h1> title</h1>
<isolate>
every thing inside here will not be able to interact withevery thing outside isolate
<script>
$('h1') = will be empty because there is no h1 inside the isolated area
</script>
</isolate>
*all the code the parent website and the ads sit on same website
You could possibly create your own selector function which could extend jQuery selector.
Maybe something like this:
You could do something like in this answer to obtain a reference to script's parent tag.