about summary refs log tree commit diff
path: root/MatrixRoomUtils.Web/wwwroot/index.html
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2023-07-17 00:21:24 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2023-07-17 00:21:24 +0200
commit1beca653b772cf10586c417b2c25df03a67df8a2 (patch)
treed539b5f329cb62f253e1bc8142c3a313719657b0 /MatrixRoomUtils.Web/wwwroot/index.html
parentChanges (diff)
downloadMatrixUtils-1beca653b772cf10586c417b2c25df03a67df8a2.tar.xz
Handle external logouts
Diffstat (limited to '')
-rw-r--r--MatrixRoomUtils.Web/wwwroot/index.html13
1 files changed, 12 insertions, 1 deletions
diff --git a/MatrixRoomUtils.Web/wwwroot/index.html b/MatrixRoomUtils.Web/wwwroot/index.html
index 0598c4d..9a85530 100644
--- a/MatrixRoomUtils.Web/wwwroot/index.html
+++ b/MatrixRoomUtils.Web/wwwroot/index.html
@@ -34,10 +34,21 @@
         if (element instanceof HTMLElement) {
             console.log(element);
             element.focus();
-        } else if (element.__internalId) {
+        } else if (element.hasOwnProperty("__internalId")) {
             console.log("Element is not an HTMLElement", element);
         }
     }
+    function getWidth(element) {
+        console.log("getWidth", element);
+        if (element == null) return 0;
+        if (element instanceof HTMLElement) {
+            return element.offsetWidth
+        } else if (element.hasOwnProperty("__internalId")) {
+            console.log("Element is not an HTMLElement", element);
+            return 0;
+        }
+        return 0;
+    }
     function getWindowDimensions() {
         return {
             width: window.innerWidth,