Skip to content

Commit

Permalink
isInIframe
Browse files Browse the repository at this point in the history
  • Loading branch information
alanorozco committed Jul 23, 2018
1 parent 9d8066c commit 66a4b94
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions extensions/amp-lightbox/0.1/amp-lightbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ class AmpLightbox extends AMP.BaseElement {
};

// Disable transition for ads since the frame gets immediately collapsed.
if (this.isInAd_()) {
if (this.isInIframe_()) {
st.resetStyles(element, ['transition']);
collapseAndReschedule();
} else {
Expand All @@ -444,8 +444,8 @@ class AmpLightbox extends AMP.BaseElement {
* @return {boolean}
* @private
*/
isInAd_() {
return getMode(this.win).runtime == 'inabox' || isInFie(this.element);
isInIframe_() {
return this.win != this.win.top;
}

/**
Expand Down

0 comments on commit 66a4b94

Please sign in to comment.