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

Make the sandbox modifier accept an enum #167

Merged
merged 2 commits into from
Dec 31, 2024
Merged

Conversation

mattesmohr
Copy link
Member

The sandbox attribute is actually an enumerated attribute. However, the unique aspect here is that the attribute also allows a list of values. Therefore the modifier should accept either an enum or a set of options.

/// Restrict everything
InlineFrame {}.sandbox()

/// Restrict everything but downloads
InlineFrame {}.sandbox(.allowDownloads)

/// Permit popups and forms
InlineFrame {}.sandbox([.allowPopups, .allowForms])

@mattesmohr mattesmohr marked this pull request as ready for review December 31, 2024 10:48
@mattesmohr mattesmohr merged commit 44b4722 into main Dec 31, 2024
1 check passed
@mattesmohr mattesmohr deleted the fix-sandbox-attribute branch December 31, 2024 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant