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,
|