mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:27:35 +00:00
LibWeb: Add HTML::CrossOriginOpenerPolicy
This commit is contained in:
parent
b838f2029b
commit
b73bd4f988
1 changed files with 34 additions and 0 deletions
|
@ -0,0 +1,34 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace Web::HTML {
|
||||||
|
|
||||||
|
// https://html.spec.whatwg.org/multipage/origin.html#cross-origin-opener-policy-value
|
||||||
|
enum class CrossOriginOpenerPolicyValue {
|
||||||
|
UnsafeNone,
|
||||||
|
SameOriginAllowPopups,
|
||||||
|
SameOrigin,
|
||||||
|
SameOriginPlusCOEP,
|
||||||
|
};
|
||||||
|
|
||||||
|
// https://html.spec.whatwg.org/multipage/origin.html#cross-origin-opener-policy
|
||||||
|
struct CrossOriginOpenerPolicy {
|
||||||
|
// A value, which is a cross-origin opener policy value, initially "unsafe-none".
|
||||||
|
CrossOriginOpenerPolicyValue value { CrossOriginOpenerPolicyValue::UnsafeNone };
|
||||||
|
|
||||||
|
// A reporting endpoint, which is string or null, initially null.
|
||||||
|
Optional<String> reporting_endpoint;
|
||||||
|
|
||||||
|
// A report-only value, which is a cross-origin opener policy value, initially "unsafe-none".
|
||||||
|
CrossOriginOpenerPolicyValue report_only_value { CrossOriginOpenerPolicyValue::UnsafeNone };
|
||||||
|
|
||||||
|
// A report-only reporting endpoint, which is a string or null, initially null.
|
||||||
|
Optional<String> report_only_reporting_endpoint;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue