The web renderer now returns the new size whenever the element is supposed to be resized. This is important so adding or removing a component to the layout or loading a new layout will adjust the size of the element accordingly. This is the same way the other renderers handle it, so we should do the same for the web renderer.
Additionally this fixes a bug in the way the strings got passed from JavaScript to Rust, where we introduced a difference between the length of a string and the capacity of its allocation, but didn't properly differentiate between them everywhere.
The web renderer now returns the new size whenever the element is supposed to be resized. This is important so adding or removing a component to the layout or loading a new layout will adjust the size of the element accordingly. This is the same way the other renderers handle it, so we should do the same for the web renderer.
Additionally this fixes a bug in the way the strings got passed from JavaScript to Rust, where we introduced a difference between the length of a string and the capacity of its allocation, but didn't properly differentiate between them everywhere.