LibWeb: Implement 'Is non-secure context' AO

This commit is contained in:
Linus Groh
2022-10-13 22:25:08 +02:00
parent 4baf0a4486
commit 8db64a8704
2 changed files with 8 additions and 0 deletions

View File

@@ -423,4 +423,11 @@ bool is_secure_context(Environment const& environment)
return false;
}
// https://html.spec.whatwg.org/multipage/webappapis.html#non-secure-context
bool is_non_secure_context(Environment const& environment)
{
// An environment is a non-secure context if it is not a secure context.
return !is_secure_context(environment);
}
}