Skip to content

Commit 65f8723

Browse files
authored
Replacing inline styles
Changed: iframeContent.setAttribute("style", "width:100%;height:100%;"); To: iframeContent.style.width="100%; iframeContent.style.height="100%; This means that a content-security-policy website header can be set to allow for a more secure implementation.
1 parent 16fa827 commit 65f8723

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/embed.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,8 @@ export abstract class Embed {
536536
if(!this.iframe) {
537537
var iframeContent = document.createElement("iframe");
538538
var embedUrl = this.config.uniqueId ? utils.addParamToUrl(this.config.embedUrl, 'uid', this.config.uniqueId) : this.config.embedUrl;
539-
iframeContent.setAttribute("style", "width:100%;height:100%;");
539+
iframeContent.style.width="100%;
540+
iframeContent.style.height="100%;
540541
iframeContent.setAttribute("src", embedUrl);
541542
iframeContent.setAttribute("scrolling", "no");
542543
iframeContent.setAttribute("allowfullscreen", "true");

0 commit comments

Comments
 (0)