createTweet returns a Promise on Chrome 52 doesn't call "then" function



My site calls createTweet function through other domain site.

client (my site) – load as iframe --> CloudFront (html) – call --> twitter embed API

I could receive then callback using createTweet function until Chrome 51.
But after Chrome 52, the promise doesn’t call “then” function.
Firefox and Safari works fine.

I watched the promise status by returning createTweet value,

var tw = twttr.widgets.createTweet(
setInterval(function() {
}, 1000);

Promise {[[PromiseStatus]]: “pending”, [[PromiseValue]]: undefined}
Promise {[[PromiseStatus]]: “pending”, [[PromiseValue]]: undefined}
Promise {[[PromiseStatus]]: “pending”, [[PromiseValue]]: undefined}

Status was much pending.

When I directly access html on CloudFront, it works fine.

Promise {[[PromiseStatus]]: “resolved”, [[PromiseValue]]: twitterwidget#twitter-widget-0.twitter-tweet.twitter-tweet-rendered}

In additional, I tried directly to use Promise on the html.
The code works well.

var p = new Promise(
  function(resolve, reject) {
  function(v) {

Embedding tweets on android chrome browser does not works

I found a solution by setting 1px height for iframe.
Chrome 52 would not allow 0px height, but I couldn’t find the changelog.

Thanks anyway


OK, glad you got it working, and thanks for sharing the solution! :thumbsup: