Implements directory browser dialog, part 4: back/forward/up navigation

This commit is contained in:
BinaryAlley committed 2024-09-21 13:44:34 +03:00
1 parent c29d829c91
commit beb66ac65e
7 files changed
+167 -30

No files matched your search

@@ -132,6 +132,10 @@ window.addEventListener('resize', function () {
}
});
/**
* Attaches a click event listener to the window, invoking a .NET method when the window is clicked.
* @param {any} dotnetHelper - .NET object to invoke methods asynchronously.
*/
window.windowClickHandler = (dotnetHelper) => {
window.addEventListener('click', (event) => {
dotnetHelper.invokeMethodAsync('OnWindowClick', {
@@ -142,6 +146,11 @@ window.windowClickHandler = (dotnetHelper) => {
});
};
/**
* Attaches a keydown event listener to the given element, invoking a .NET method when 'Escape' is pressed.
* @param {HTMLElement} element - The HTML element to attach the keydown listener to.
* @param {any} dotnetHelper - .NET object to invoke methods asynchronously.
*/
window.windowKeyDownHandler = (element, dotnetHelper) => {
element.addEventListener('keydown', (e) => {
if (e.key === 'Escape') {