mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
LibWeb: Make HTMLIFrameElement.sandbox.supports() not throw
We have to list the set of allowed values for the DOMTokenList to not throw when asking if one is supported. This fixes an issue where YouTube embeds would hang indefinitely trying to report an endless series of exceptions, seen on https://null.com/
This commit is contained in:
parent
b1796ebd2c
commit
a7b3360fb6
Notes:
github-actions[bot]
2024-12-03 14:31:06 +00:00
Author: https://github.com/awesomekling
Commit: a7b3360fb6
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2729
2 changed files with 4 additions and 2 deletions
|
@ -214,6 +214,7 @@ WebIDL::ExceptionOr<bool> DOMTokenList::supports(StringView token)
|
|||
static HashMap<FlyString, Vector<StringView>> supported_tokens_map = {
|
||||
// NOTE: The supported values for rel were taken from HTMLLinkElement::Relationship
|
||||
{ HTML::AttributeNames::rel, { "alternate"sv, "stylesheet"sv, "preload"sv, "dns-prefetch"sv, "preconnect"sv, "icon"sv } },
|
||||
{ HTML::AttributeNames::sandbox, { "allow-downloads"sv, "allow-forms"sv, "allow-modals"sv, "allow-orientation-lock"sv, "allow-pointer-lock"sv, "allow-popups"sv, "allow-popups-to-escape-sandbox"sv, "allow-presentation"sv, "allow-same-origin"sv, "allow-scripts"sv, "allow-top-navigation"sv, "allow-top-navigation-by-user-activation"sv, "allow-top-navigation-to-custom-protocols"sv } },
|
||||
};
|
||||
|
||||
// 1. If the associated attribute’s local name does not define supported tokens, throw a TypeError.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue