On Fri, Feb 20, 2015 at 9:11 PM, Jonas Sicking <jo...@sicking.cc> wrote:
> On Thu, Feb 19, 2015 at 6:27 PM, Robert O'Callahan <rob...@ocallahan.org> > wrote: > > Should UIWorkers have access to the full Worker API? It seems like > there's > > no reason not to give them that. > > There's two use-cases that I think argues against that. > > First off I'd like to enable saving a webpage for later viewing. Right > now the best we can do is to save a pdf which means that all > scrollable areas are lost. > > Saving a full page with all scripts is rarely going to work result in > the user seeing the page they did when saving the page. > > What I'd like to be able to do is serialize the DOM, strip all script, > save all linked stylesheets, images and media and change the > references to them to use the correct relative URLs. > > However this would require also saving the UIWorker and enabling it to > run in a reliable way. Otherwise the saved page won't have a working > layout. Second, when printing, I'd like to enable the user to change page > layout and margins and have that reflow the page and generate a > correct layout. This means that we need to enable the UIWorker to work > on the cloned document in a reliable way. > I think both these usecases would work much better if we ensured that > the UIWorker couldn't "interact with the outside world". > Your use-cases already fail today because many Web pages use scroll event handlers and JS custom layouts. UIWorkers won't make the problem any worse. Furthermore, I think facilitating expressive performant mobile Web apps is much more important than those use-cases, and preventing UIWorkers from interacting with the outside world (including, I assume, the application main thread) would severely limit their usefulness. Personally I think it's futile to try to save a complex app "for later viewing" and expect anything useful to happen unless the whole app is captured and able to operate offline. Rob -- oIo otoeololo oyooouo otohoaoto oaonoyooonoeo owohooo oioso oaonogoroyo owoiotoho oao oboroootohoeoro oooro osoiosotoeoro owoiololo oboeo osouobojoeocoto otooo ojouodogomoeonoto.o oAogoaoiono,o oaonoyooonoeo owohooo osoaoyoso otooo oao oboroootohoeoro oooro osoiosotoeoro,o o‘oRoaocoao,o’o oioso oaonosowoeoroaoboloeo otooo otohoeo ocooouoroto.o oAonodo oaonoyooonoeo owohooo osoaoyoso,o o‘oYooouo ofooooolo!o’o owoiololo oboeo oiono odoaonogoeoro ooofo otohoeo ofoioroeo ooofo ohoeololo. _______________________________________________ dev-servo mailing list dev-servo@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-servo