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

Provide a callback mechanism to customize 3p iframe configuration in custom iframe #1210

Closed
cramforce opened this issue Dec 21, 2015 · 1 comment

Comments

@cramforce
Copy link
Member

Basically people want to do custom things in their "remote.html" file and they should be able to, but ideally with minimal API surface, so they don't hard code assumption into our interface between the frames.

Currently there is code like this

<div id="c" style="position:absolute;top:0;left:0;bottom:0;right:0;">
  <script>draw3p()</script>
</div>

We should allow passing a callback like

<div id="c" style="position:absolute;top:0;left:0;bottom:0;right:0;">
  <script>draw3p(function(config, done) { doSomethingWithConfig(config); done(config) })</script>
</div>

This could e.g. be added to add more targeting info or to switch to a different ad provider.

@cramforce
Copy link
Member Author

CC @kashyapnitin

cramforce added a commit to cramforce/amphtml that referenced this issue Dec 21, 2015
to manipulate incoming ad configuration in a callback function.

This is only available for publishers who host the ad iframe themselves.
With that they can obviously do whatever they want, but with this there is a larger incentive to stay within the AMP system and don't rely on implicit APIs (such as how we pass in configuration).

Fixes ampproject#1210
msukmanowsky pushed a commit to Parsely/amphtml that referenced this issue Jan 21, 2016
to manipulate incoming ad configuration in a callback function.

This is only available for publishers who host the ad iframe themselves.
With that they can obviously do whatever they want, but with this there is a larger incentive to stay within the AMP system and don't rely on implicit APIs (such as how we pass in configuration).

Fixes ampproject#1210
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant