-
-
Notifications
You must be signed in to change notification settings - Fork 923
web: Allow data-ruffle-optout for any element to opt-out that section #21383
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
base: master
Are you sure you want to change the base?
web: Allow data-ruffle-optout for any element to opt-out that section #21383
Conversation
Just looked at old issues, so adding: Addresses #10785 (not called Edit: Actually, I'm not sure that's what is meant by the request. They say "This would be useful for cases where certain objects in a SWF file should not be displayed or processed by Ruffle." That doesn't quite match what I'm implementing. |
96e01cf
to
1bdb688
Compare
What about the existing |
// We could try to pass the config specific to this element all the way | ||
// but only the extension can set ignoreOptout and when it does | ||
// it gets added to the global RufflePlayer config, so this is simpler. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't look good to me, isn't the page able to override the extension's choice this way if it wanted to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, what the comment is saying is that we're not checking the <ruffle-player>
element's config, but that's irrelevant because that's not what the extension sets! (for this particular config option, anyway)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm, to me that comment suggests we could pass the config from within the code, but we aren't doing that because it's simpler to use the global config, which will also have these properties.
The issue I see here is that the global object could be modified by the website.
The purpose is so if a single page has some content that works with Ruffle and some that does not you can add this directly to the embeds that don't work, or even to some parent div of all the embeds that don't work with Ruffle. It still can be ignored with the "Play Flash content even on sites that disallow Ruffle" toggle.
Before this, you could only opt-out of Ruffle page-wide with data-ruffle-optout on the https://developer.mozilla.org/en-US/docs/Web/API/Document/documentElement of the page or iframe.
Requested on Discord.