1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:17:34 +00:00

WebContent: Rename $0 getter and use global object instead of this

Using the global object works consistently in native accessors and
native functions, so changing this for consistency.
This commit is contained in:
Sam Atkins 2022-11-19 16:08:16 +00:00 committed by Linus Groh
parent f9c9506997
commit 3ec13fdb86
2 changed files with 13 additions and 11 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, Sam Atkins <atkinssj@serenityos.org>
* Copyright (c) 2021-2022, Sam Atkins <atkinssj@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -36,8 +36,8 @@ public:
private:
virtual void visit_edges(Visitor&) override;
// Because $0 is not a nice C++ function name
JS_DECLARE_NATIVE_FUNCTION(inspected_node_getter);
// $0, the DOM node currently selected in the inspector
JS_DECLARE_NATIVE_FUNCTION($0_getter);
Web::HTML::Window* m_window_object;
};