Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add sandbox option #61

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

feat: add sandbox option #61

wants to merge 2 commits into from

Conversation

Avol-V
Copy link

@Avol-V Avol-V commented Feb 5, 2025

Adds the sandbox option for the srcdoc mode, which allows you to enable additional security levels (the sandbox attribute on the iframe).

Fixes #59

setClassNames = (classNames: string[] | undefined = []) => {
updateClassNames(this.domContainer, classNames, this.classNames);

// update this._classNames to the new classNames
Copy link
Collaborator

Choose a reason for hiding this comment

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

In my opinion, these comments are redundant, lets delete it

setStyles = (styles: Record<string, string> | undefined = {}) => {
updateStyles(this.domContainer, styles, this.styles);

// update this._styles to the new styles
Copy link
Collaborator

Choose a reason for hiding this comment

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

In my opinion, these comments are redundant, lets delete it


this.domContainer.replaceChildren(fragment);

// TODO: should we reinitialize Observer?
Copy link
Collaborator

Choose a reason for hiding this comment

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

The comment does not give an understanding of why, let's add more context.

Copy link
Author

Choose a reason for hiding this comment

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

All these comments are from the original class IFrameController, I can just delete them.

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.

Sandbox restrictions for iframe in srcdoc mode
2 participants