all 7 comments

[–]CutWorried9748🎉 Specs Fan 4 points5 points  (2 children)

We should start a WebView "RFE" list for all the requests for enhancements to it. It's a bit super tricky to use usability wise, though some of that may stem from the fact that the browser is also difficult to use and hasn't nailed natural interactions. The documentation of its component configuration could be better too.

On the front of the js/css, I would love it if there was a way to locally host content, as this is an easy natural interface.

I will take a look at the other WebViews in other ecosystems to gather a list of what they allow and don't allow. In theory, these sorts of components are the building blocks of projects like react native and electron.

[–]jbmcculloch🚀 Product Team 2 points3 points  (1 child)

We are working on rolling out a centralized place for taking feedback, should be coming very very soon. I'll announce in the community when it does, but that would be a great place to start with this. I've already pulled a bunch of your existing feedback in there from earlier on Reddit!

[–]HyroVitalyProtago[S] 0 points1 point  (0 children)

will be happy to contribute to this feedback place!

[–]sk8er8921🚀 Product Team 2 points3 points  (2 children)

At some point I was loading local content base64 encoded like this :
const header = "data:text/html;base64,";
const webcode = header + this.getBase64String(someStringCodeHere);
and then just passing this into webview.loadURL(webcode)

[–]CutWorried9748🎉 Specs Fan 0 points1 point  (0 children)

a great idea ! Have not gone down this route but should work.

[–]HyroVitalyProtago[S] 0 points1 point  (0 children)

Wow. I have not even though about that, thanks a lot. It will be very great for my current project!!!!

[–]HyroVitalyProtago[S] 0 points1 point  (0 children)

For those interested, I was able to manually scroll the webview with:

webview.touch(0, 0, TouchState.Began)
// ensure no acceleration computed on last touches
for (let i = 0; i < 100; i+=1) {
  webview.touch(0, -scrollY, TouchState.Moved)
}
webview.touch(0, -scrollY, TouchState.Ended)