Skip to content

Commit

Permalink
Fix amp-position-observer not working in cross domain inabox. (#23982)
Browse files Browse the repository at this point in the history
  • Loading branch information
zombifier authored and lannka committed Aug 22, 2019
1 parent b6a200f commit 5929c05
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion examples/amphtml-ads/scrollbound-animation-ad.a4a.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@
<!--
The animations are implemented using [amp-animation]({{g.doc('/content/amp-dev/documentation/components/reference/amp-animation.md', locale=doc.locale).url.path}}) which is an AMP component that uses [Web Animations API](https://www.w3.org/TR/web-animations/) to support both __time__ and __scroll__ based animations.
-->
<div style="height: 200vh"></div>
<amp-animation id="adAnim" layout="nodisplay">
<script type="application/json">
{
Expand Down
4 changes: 2 additions & 2 deletions src/inabox/inabox-viewport.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,8 @@ export class ViewportBindingInabox {
MessageType.POSITION,
data => {
this.requestPositionPromise_ = null;
devAssert(data.targetRect, 'Host should send targetRect');
resolve(data.targetRect);
devAssert(data['targetRect'], 'Host should send targetRect');
resolve(data['targetRect']);
}
);
});
Expand Down

0 comments on commit 5929c05

Please sign in to comment.