Skip to content

Conversation

@notnownikki
Copy link
Member

Description

Fix for concern highlighted in #9500 (comment)

How has this been tested?

Embed a tweet, embed a youtube video, and check the video has an aspect ratio CSS class applied, and the tweet does not.

Screenshots

Types of changes

Bug fix (non-breaking change which fixes an issue)

const previewDom = document.createElement( 'div' );
previewDom.innerHTML = html;
const iframe = previewDom.querySelector( 'iframe' );
const previewDocument = document.implementation.createHTMLDocument();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The title argument is not optional in IE11:

https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createHTMLDocument#Parameters

Can be solved by just passing '' empty string.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix pushed up. So glad we have you to pick up on these things, I would not have discovered that!

Copy link
Member

@aduth aduth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 👍 LGTM

@notnownikki notnownikki merged commit fe70f02 into master Sep 12, 2018
@notnownikki notnownikki deleted the fix/embed-iframe-query-with-htmldocument branch September 12, 2018 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants