In general, ads get to run arbitrary javascript. This is terrible, because once you open the door to a programming language people can pull in anything. Automated and manual review can help, but it's hard to stop technically.
I'm currently working on making ads declarative [1] so they don't get to do this anymore.
I'm currently working on making ads declarative [1] so they don't get to do this anymore.
[1] Specifically, AMP Inabox, which is AMP ads on non-AMP pages: https://www.ampproject.org/docs/ads/amphtml_ads