Hey Nathan, I really appreciate the fast response!
If my SDK doesn't support this example, then is my SDK still considered MRAID compliant?
The 2.0 spec has a section entitled "Standard Web Technologies" that states "The ad designer should be able to develop and test the ad unit in a web browser". So, I want to create an mraid.js file and serve it from my ad server to make my creatives preview-able in a standard desktop browser. This is very do-able for most of the MRAID creatives I've seen.
I've included some examples below. Example #1 works great. Example #2 is clearly wrong and Example #3 is what the
iab.net expandable example does. Example #2 and #3 both have the same problem, but example #2 illustrates that problem in a very clear manner.
Example #1: Great!
<script src="mraid.js"></script>
<script>
console.log(mraid.getState)); // this works great and follows standard browser behavior
</script>
Example #2: Wrong!
<script>
console.log(mraid.getState));
</script>
<script src="mraid.js"></script>
Example #3: Wrong just like #2, but is confusing
<script>
document.write('<script src="mraid.js"></'+/script>');
console.log(mraid.getState()); // expecting this to work implies a magical browser
</script>
The spec says MRAID creatives can be developed/tested in a browser, but then provides an example that cannot work in a browser. Isn't that a problem? Did this make any sense? Thanks again!