Live data from Hacker News

Webkit.js

trevorlinton.github.io

41–50 of 106 posts

Re: Webkit.js

#41
post #34

Neat. Getting some good use out of HTML2Canvas as well. But always wondering why there is no way to get a bitmap from screen... something like window.getPixels(x, y, width, height).

There are privacy and security concerns to address. Similar to this situation: https://hacks.mozilla.org/2010/03/privacy-related-changes-co...

Re: Webkit.js

#42

this is pretty cool but network requests and javascript support would make it even more crazier. I viewed the html source for this page and pasted it. I was quite impressed. It looks like this is supposed to be a browser engine written in Javascript? So essentially we would have a sandbox browser within a browser? That would be awesome.

> javascript support would make it even more crazier

There's interesting research being done in the area of meta-circular interpreters. There's techniques for speeding them up; they're not as slow as I'd expect. For example, one interpreter can do type analysis and rewrite chunks of code.

Re: Webkit.js

#44
post #34

Neat. Getting some good use out of HTML2Canvas as well. But always wondering why there is no way to get a bitmap from screen... something like window.getPixels(x, y, width, height).

There are privacy and security concerns to address. Similar to this situation: https://hacks.mozilla.org/2010/03/privacy-related-changes-co...

One solution is for the browser to provide a "anonymized" bitmap picture, e.g. setting the links to default colors. I don't know how feasible that is. It would require a new rendering of the page, at least.

Re: Webkit.js

#45

Why? Not being dry/evil, simply just interesting in whether this project has practical offshoot or is pure fun (..)?

I was wondering the same thing. Why would anyone ever need to do something like this? What kind of project would this come useful?

Re: Webkit.js

#47

Why? Not being dry/evil, simply just interesting in whether this project has practical offshoot or is pure fun (..)?

Doing this in the browser might be a little silly, or at least I can't immediately think of a good use, but I think using this in a node.js program as an easy way to template something out and render an image/pdf locally could be useful.

Re: Webkit.js

#48
post #34

Neat. Getting some good use out of HTML2Canvas as well. But always wondering why there is no way to get a bitmap from screen... something like window.getPixels(x, y, width, height).

Firefox has had the element() CSS function for a while, but they're the only ones.

https://developer.mozilla.org/en-US/docs/Web/CSS/element

I've written GUI builders that really could have used this for icons of views. Instead I had to render on the server. It'd be nice if it got more broadly adopted.

Re: Webkit.js

#49

Earlier quoted context omitted.

>The browsers that are in the Apple App store are handicapped by legal limitations, which are not present on other, more open operating systems. Is FirefoxOS more or less 'open' than iOS? You can't write a competitive javascript runtime for FirefoxOS either.

You can fork the project on Github and Mercurial and write DOM bindings to whatever JavaScript engine you'd like. [0] https://github.com/mozilla-b2g/B2G [1] http://hg.mozilla.org/

Having to convince users to install your fork of the OS really isn't the same thing as being able to run a different native browser alongside their existing software. If the only way to use a browser other than Internet Explorer had been to switch OS then Firefox could never have been created in the first place.

Re: Webkit.js

#50

Earlier quoted context omitted.

Because competition in the browser market is vital to keep the web platform progressing and to prevent a single party from controlling web standards. Do you remember the dark ages when IE ruled the web and things like HTML5, canvas, webgl, etc... couldn't happen?

>competition in the browser market is vital to keep the web platform progressing and to prevent a single party from controlling web standards I don't see much difference between a single party and a cartel of 3-4 parties. They are all mega corporations that don't share my interests and even when there are several parties any one effectively has veto power over any changes to standards. The push for browser-as-OS is o…

That's true that we don't let other web runtimes be used on FirefoxOS so far. There are good technical reasons for that, not just "mozilla is evil".

Doing while preserving security would mean that such a runtime would run sandboxed (in the same way we render web pages with gecko in sandboxed processes). For that to work, the sandboxed process need to delegate some functionality to the "main" trusted process, like network access. This is happening through an ipc protocol (we reused the one from chromium) but the messages exchanged are very much gecko specific currently, so a lot of work would be needed to turn that into a more generic ipc embedding interface.

I'm pretty sure that the folks working on Servo would be very happy to plug in their engine there ;)

Post reply on HN