about summary refs log tree commit diff
path: root/MatrixRoomUtils.Web/wwwroot
diff options
context:
space:
mode:
Diffstat (limited to 'MatrixRoomUtils.Web/wwwroot')
-rw-r--r--MatrixRoomUtils.Web/wwwroot/css/app.css2
-rw-r--r--MatrixRoomUtils.Web/wwwroot/index.html13
2 files changed, 13 insertions, 2 deletions
diff --git a/MatrixRoomUtils.Web/wwwroot/css/app.css b/MatrixRoomUtils.Web/wwwroot/css/app.css

index b3a8cf3..bcd8f5d 100644 --- a/MatrixRoomUtils.Web/wwwroot/css/app.css +++ b/MatrixRoomUtils.Web/wwwroot/css/app.css
@@ -118,4 +118,4 @@ a, .btn-link { pre { font-family: JetBrainsMono, var(--bs-font-monospace); -} \ No newline at end of file +} 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,