Skip to content

Commit

Permalink
Remove listeners in unlayoutCallback() (ampproject#14930)
Browse files Browse the repository at this point in the history
  • Loading branch information
nainar authored and Noran Azmy committed May 10, 2018
1 parent 15c8336 commit 456c4b1
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions extensions/amp-facebook-comments/0.1/amp-facebook-comments.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ class AmpFacebookComments extends AMP.BaseElement {
removeElement(this.iframe_);
this.iframe_ = null;
}
if (this.unlistenMessage_) {
this.unlistenMessage_();
}
return true;
}
}
Expand Down
3 changes: 3 additions & 0 deletions extensions/amp-facebook-like/0.1/amp-facebook-like.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ class AmpFacebookLike extends AMP.BaseElement {
removeElement(this.iframe_);
this.iframe_ = null;
}
if (this.unlistenMessage_) {
this.unlistenMessage_();
}
return true;
}
}
Expand Down
3 changes: 3 additions & 0 deletions extensions/amp-facebook-page/0.1/amp-facebook-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ class AmpFacebookPage extends AMP.BaseElement {
removeElement(this.iframe_);
this.iframe_ = null;
}
if (this.unlistenMessage_) {
this.unlistenMessage_();
}
return true;
}
}
Expand Down
3 changes: 3 additions & 0 deletions extensions/amp-facebook/0.1/amp-facebook.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ class AmpFacebook extends AMP.BaseElement {
removeElement(this.iframe_);
this.iframe_ = null;
}
if (this.unlistenMessage_) {
this.unlistenMessage_();
}
return true;
}
}
Expand Down

0 comments on commit 456c4b1

Please sign in to comment.