Open benbucksch opened 3 months ago
Progress Update
<webview/>
using the Shared/WebView
Componentmin-height
for the iframe that is within the webview. The min-height
is 126px.
Known Issues:
Tried:
document.body.scrollTop/scrollLeft
gives an value of 0window.postMessage()
gives a Origin Policy Error
TODO
Make the webview tag have a max-width of it's parent
Try to set the max-width at the start, before rendering, i.e. at the same time when we set the content, not in the resize handler.
Normal (non-hvbox-flex-grid) layout works by first determining the width, then the layout including line wraps happens, and then the height is a result of the content height. Without knowing the width, the browser doesn't know where to wrap lines and therefore doesn't know how many text lines there are and therefore cannot know the know the height. That's why the width needs to be set, before the height can be determined.
Hey Jeremy, thanks for PR #185 . It makes the sizing work much better. I just merged it. But still disabled for now.
Remaining issues that I could see:
Reproduction
Actual result
Expected result
Cause
WebView.svelte
, which uses Chrome<webview>
, which is a better<iframe>
. However, iframe and webview are sized by their parents only.postMessage(message, targetOrigin)
might help. Ideally, we wouldn't need JS within the iframe, though.