mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 23:07:34 +00:00
LibWeb: Notify the PageClient when the children of <title> change
This commit is contained in:
parent
2a5877b02c
commit
4c8dbc908c
2 changed files with 12 additions and 0 deletions
|
@ -24,7 +24,9 @@
|
||||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <LibWeb/DOM/Document.h>
|
||||||
#include <LibWeb/HTML/HTMLTitleElement.h>
|
#include <LibWeb/HTML/HTMLTitleElement.h>
|
||||||
|
#include <LibWeb/Page/Page.h>
|
||||||
|
|
||||||
namespace Web::HTML {
|
namespace Web::HTML {
|
||||||
|
|
||||||
|
@ -37,4 +39,11 @@ HTMLTitleElement::~HTMLTitleElement()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void HTMLTitleElement::children_changed()
|
||||||
|
{
|
||||||
|
HTMLElement::children_changed();
|
||||||
|
if (auto* page = document().page())
|
||||||
|
page->client().page_did_change_title(document().title());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,6 +36,9 @@ public:
|
||||||
|
|
||||||
HTMLTitleElement(DOM::Document&, const QualifiedName& qualified_name);
|
HTMLTitleElement(DOM::Document&, const QualifiedName& qualified_name);
|
||||||
virtual ~HTMLTitleElement() override;
|
virtual ~HTMLTitleElement() override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
virtual void children_changed() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue