Skip to content

Commit 80787d3

Browse files
AtkinsSJgmta
authored andcommitted
LibWeb/DOM: Stub out Document.exitPointerLock()
This lets us leave the main menu on classic.minecraft.net by tapping Escape again.
1 parent 17e5993 commit 80787d3

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

Libraries/LibWeb/DOM/Document.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6954,4 +6954,9 @@ void Document::remove_pending_css_import_rule(Badge<CSS::CSSImportRule>, GC::Ref
69546954
m_pending_css_import_rules.remove(rule);
69556955
}
69566956

6957+
void Document::exit_pointer_lock()
6958+
{
6959+
dbgln("FIXME: exit_pointer_lock()");
6960+
}
6961+
69576962
}

Libraries/LibWeb/DOM/Document.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -958,6 +958,8 @@ class WEB_API Document
958958
CSS::StyleScope const& style_scope() const { return m_style_scope; }
959959
CSS::StyleScope& style_scope() { return m_style_scope; }
960960

961+
void exit_pointer_lock();
962+
961963
protected:
962964
virtual void initialize(JS::Realm&) override;
963965
virtual void visit_edges(Cell::Visitor&) override;

Libraries/LibWeb/DOM/Document.idl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,9 @@ interface Document : Node {
167167

168168
// https://www.w3.org/TR/SVG2/struct.html#InterfaceDocumentExtensions
169169
readonly attribute SVGSVGElement? rootElement;
170+
171+
// https://w3c.github.io/pointerlock/#extensions-to-the-document-interface
172+
undefined exitPointerLock();
170173
};
171174

172175
dictionary ElementCreationOptions {

0 commit comments

Comments
 (0)