mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-25 09:04:53 +00:00
LibWeb: Add naive support for the Document.referrer attribute
It always returns the empty string for now.
This commit is contained in:
@@ -964,4 +964,10 @@ bool Document::has_a_style_sheet_that_is_blocking_scripts() const
|
||||
return browsing_context()->container_document()->m_script_blocking_style_sheet_counter > 0;
|
||||
}
|
||||
|
||||
String Document::referrer() const
|
||||
{
|
||||
// FIXME: Return the document's actual referrer.
|
||||
return "";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
@@ -58,6 +58,8 @@ public:
|
||||
String cookie(Cookie::Source = Cookie::Source::NonHttp);
|
||||
void set_cookie(String, Cookie::Source = Cookie::Source::NonHttp);
|
||||
|
||||
String referrer() const;
|
||||
|
||||
bool should_invalidate_styles_on_attribute_changes() const { return m_should_invalidate_styles_on_attribute_changes; }
|
||||
void set_should_invalidate_styles_on_attribute_changes(bool b) { m_should_invalidate_styles_on_attribute_changes = b; }
|
||||
|
||||
|
||||
@@ -13,6 +13,8 @@ interface Document : Node {
|
||||
|
||||
attribute DOMString cookie;
|
||||
|
||||
readonly attribute USVString referrer;
|
||||
|
||||
Element? getElementById(DOMString id);
|
||||
HTMLCollection getElementsByName(DOMString name);
|
||||
HTMLCollection getElementsByTagName(DOMString tagName);
|
||||
|
||||
Reference in New Issue
Block a user