Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make x-domain safe frame example work out of the box #955

Merged
merged 2 commits into from
Feb 8, 2017

Conversation

brondsem
Copy link
Contributor

  • Nest in <script> tags
  • Use garden-variety JS
  • Dynamically parse host domain
  • Use https for ad server

This addresses some of the #954 issues. I didn't know what a valid replacement for id would be, and the IE HTTPS issue is outstanding as well.

* Nest in <script> tags
* Use garden-variety JS
* Dynamically parse host domain
* Use https for ad server
@protonate protonate self-assigned this Feb 1, 2017
@protonate protonate self-requested a review February 1, 2017 19:09
IE was throwing `SEC7111: HTTPS security is compromised by (null)`
Other approaches to writing the HTML out would be to use innerHTML, but see
https://stackoverflow.com/questions/1197575/can-scripts-be-inserted-with-innerhtml
One of the suggestions there lead to http://krasimirtsonev.com/blog/article/Convert-HTML-string-to-DOM-element
but that assumes the HTML is all under a single element (doesn't work with
<p>..</p><p>..</p>) and also moves DOM elements around which might cause
<script> tags to not find nearby elements properly.  So settled on
creating a new iframe, and leaving it rather than moving its contents up into
the current frame.
@brondsem
Copy link
Contributor Author

brondsem commented Feb 2, 2017

I've added a commit which avoids the IE error, but read the commit message for all the gory details. I do not have super high confidence in this yet, but it is more successful than the doc.write.

@protonate protonate added this to the Prebid 0.19.0 milestone Feb 3, 2017
@protonate protonate mentioned this pull request Feb 3, 2017
2 tasks
@brondsem brondsem mentioned this pull request Feb 7, 2017
8 tasks
Copy link
Collaborator

@protonate protonate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thank you.

@protonate protonate merged commit eb10289 into prebid:master Feb 8, 2017
@mkendall07
Copy link
Member

Great stuff, thanks!

mp-12301 pushed a commit to aol/Prebid.js that referenced this pull request Apr 10, 2017
…ebid-official-0.19.0 to release/1.14.0

* commit 'b13f7ba7ee8b3c168dc0af7c8bfc94747d017e70': (34 commits)
  Add changelog entry.
  Prebid 0.19.0 Release
  check truthiness of adUnitCode (prebid#990)
  fixed exception when refreshing individual Ad Units and bidder responds slowly (prebid#989)
  Stub pixel drop to prevent network request in test (prebid#988)
  Updating Komoona adapter to support future Prebid requirements (prebid#974)
  Use stable version of Chrome (prebid#984)
  Revert to running browser tests in Travis (prebid#983)
  Fix issue with appnexusAst sending `user` object in the wrong place. (prebid#980)
  Integrate Browserstack tests into Travis CI build (prebid#839)
  Add StickyAdsTV Bidder adapter (prebid#916)
  Stronger xdomain checks (prebid#971)
  added matomy as an alias for appnexus (prebid#850)
  Added 152Media Appnexus Alias (prebid#952)
  OpenX Adapter: Handles fallback ads correctly as a no fill (prebid#39) (prebid#963)
  Use package dependencies for ES6 Array shims (prebid#962)
  Make x-domain safe frame example work out of the box (prebid#955)
  added usersync for adkernel adapter (prebid#951)
  Rubicon adapter: add a floor variable (prebid#964)
  Added Lifestreet adapter. (prebid#965)
  ...
mp-12301 pushed a commit to aol/Prebid.js that referenced this pull request Apr 10, 2017
…14.0 to master

* commit 'c008f3f531ae3409f4a16bf03470d84e82aead0e': (35 commits)
  Add adapters in aolPartnersIds.json.
  Add changelog entry.
  Prebid 0.19.0 Release
  check truthiness of adUnitCode (prebid#990)
  fixed exception when refreshing individual Ad Units and bidder responds slowly (prebid#989)
  Stub pixel drop to prevent network request in test (prebid#988)
  Updating Komoona adapter to support future Prebid requirements (prebid#974)
  Use stable version of Chrome (prebid#984)
  Revert to running browser tests in Travis (prebid#983)
  Fix issue with appnexusAst sending `user` object in the wrong place. (prebid#980)
  Integrate Browserstack tests into Travis CI build (prebid#839)
  Add StickyAdsTV Bidder adapter (prebid#916)
  Stronger xdomain checks (prebid#971)
  added matomy as an alias for appnexus (prebid#850)
  Added 152Media Appnexus Alias (prebid#952)
  OpenX Adapter: Handles fallback ads correctly as a no fill (prebid#39) (prebid#963)
  Use package dependencies for ES6 Array shims (prebid#962)
  Make x-domain safe frame example work out of the box (prebid#955)
  added usersync for adkernel adapter (prebid#951)
  Rubicon adapter: add a floor variable (prebid#964)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants