Skip to content

T naabus/i frame csp compatible - #172

Merged
t-naabus merged 3 commits into
devfrom
t-naabus/iFrameCSPCompatible
Mar 16, 2017
Merged

t-naabus merged 3 commits into
devfrom
t-naabus/iFrameCSPCompatible

Conversation

@t-naabus

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread src/embed.ts Outdated
const iframeHtml = `<iframe style="width:100%;height:100%;" src="${this.config.embedUrl}" scrolling="no" allowfullscreen="true"></iframe>`;
this.element.innerHTML = iframeHtml;
this.iframe = <HTMLIFrameElement>this.element.childNodes[0];
var iframeContent = document.createElement("IFRAME");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Will all the created Iframes have the same identifier? How can we differentiate them? By the container div??

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

If I understood the question correctly, yes. the iframes are differentiated by the containers' id.

Comment thread src/embed.ts
this.iframe = <HTMLIFrameElement>this.element.childNodes[0];
var iframeContent = document.createElement("IFRAME");
var embedUrl = this.config.embedUrl;
iframeContent.setAttribute("style", "width:100%;height:100%;");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

instead of style, use class and declare the style in css file.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We don't have a css file, css is present in the demo only.

Comment thread src/embed.ts Outdated
var node = this.element;
while(node.firstChild) {
node.removeChild(node.firstChild);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

spaces

@t-naabus
t-naabus merged commit d8cf756 into dev Mar 16, 2017
@t-naabus
t-naabus deleted the t-naabus/iFrameCSPCompatible branch March 16, 2017 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants