mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:07:35 +00:00
LibWeb: Add Origin concept (protocol, host, port tuple)
Every Document now has an Origin, found via Document::origin(). It's based on the URL of the document. This will be used to implement things like the same-origin policy.
This commit is contained in:
parent
53f63058b9
commit
7382b27c22
6 changed files with 71 additions and 6 deletions
|
@ -48,12 +48,14 @@ class Document
|
|||
public:
|
||||
using WrapperType = Bindings::DocumentWrapper;
|
||||
|
||||
Document();
|
||||
explicit Document(const URL& = {});
|
||||
virtual ~Document() override;
|
||||
|
||||
void set_url(const URL& url) { m_url = url; }
|
||||
const URL& url() const { return m_url; }
|
||||
|
||||
Origin origin() const;
|
||||
|
||||
URL complete_url(const String&) const;
|
||||
|
||||
void fixup();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue