Frontmatter
| id | 4951 |
| title | main.DomAccess: getBoundingClientRect() does not pass minHeight & minWidth to the app worker |
| state | Closed |
| labels | bugstale |
| assignees | tobiu |
| createdAt | Sep 27, 2023, 8:35 PM |
| updatedAt | Sep 13, 2024, 4:29 AM |
| githubUrl | https://github.com/neomjs/neo/issues/4951 |
| author | tobiu |
| commentsCount | 3 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Sep 13, 2024, 4:29 AM |
main.DomAccess: getBoundingClientRect() does not pass minHeight & minWidth to the app worker

the json conversion works (had to add new class fields for it):
we should keep this change.
however, there is a lot more to it. in case we are creating a worker message, we now get the 2 missing values while creating it:
but, the result inside the app worker will convert the result back into DOMRect instances (native code), in which case we lose the custom fields right away:
not sure, if we can even manipulate this part. might(!) be possible.
testing it in firefox => messages containing DOMRects feel slow.
@ExtAnimal: before doing a final change, we should sync on this ticket. my current recommendation is that getBoundingClientRect() inside main.DomAccess should just return a plain object (we can use the new toJSON() method for it) and other non-remote methods could convert it to Rectangle instances.
related to: https://github.com/neomjs/neo/issues/4950
while we can not use
JSON.stringify()forDOMRects, the output will not include custom class field values.however, we can modify what we get back on class level.
@ExtAnimal