mraid / webtester

MRAID Web-based Ad Creative Testing Tool
http://webtester.mraid.org
BSD 2-Clause "Simplified" License
78 stars 39 forks source link

Document.write() support #4

Closed dpyryesk closed 2 years ago

dpyryesk commented 9 years ago

Hi,

I would like to submit some modifications to the webtester tool. Our company's ads are served from a dynamic javascript that relies on document.write() function to modify the underlying page. It is impossible to test such ad using HTML fragment, because by the time the script is executed, the DOM tree of the document is already built and calling document.write() will throw an error. To support this functionality, I have added a new textbox on Flight page where a user can paste their JavaScript. The script is passed to device.html page and is executed while the page is loading, therefore enabling testing ads that rely on document.write() function. A checkbox below the textbox allows switching between using a script's URL or a JavaScript source.

Please feel free to merge this functionality if you feel it will be useful for others as well.

Regards,

Dmitry

seanmerrigan commented 8 years ago

This would be a great addition. @dpyryesk can you provide a script URL for a test ad?

dpyryesk commented 8 years ago

Sure, give this one a try: http://voken.eyereturn.com/?1108930 It uses mraid.open()