

Mozilla's WebAPI takes shape, can now read battery state, send SMS, vibrate - mrsebastian
http://www.extremetech.com/computing/107211-mozillas-webapi-for-firefox-takes-shape-porn-sites-quiver-in-anticipation

======
thedjpetersen
I wasn't aware that Mozilla planned to build some sort of OS as well. It is
nice that they are pushing for a more open version of Android. Its neat to see
another large organization like Mozilla bring apps from the desktop to the
web.

~~~
sabret00the
But they're not pushing for a more open version of Android, they're pushing
for a mobile version of ChromeOS.

~~~
drivebyacct2
Indeed. <https://wiki.mozilla.org/B2G>

------
nkassis
Cool but does Firefox have some sort of whitelist to give certain sites
permissions to use these apis? I don't want random sites snapping images of my
crotch.

~~~
mbrubeck
Yes, browsers will ask permission before letting any site use these APIs, just
as they already do for many other APIs like Appcache, Local Storage,
Geolocation, popups, Desktop Notifications, etc.

You can see this in action by trying out any of these APIs in a browser that
supports them. For example, most browsers now support Geolocation and will
display a permission request when you launch this demo (unless you have
already whitelisted the domain): [https://developer.mozilla.org/en-
US/demos/detail/urban-arter...](https://developer.mozilla.org/en-
US/demos/detail/urban-arteries)

Camera capture in particular can only be initiated and controlled by the user
-- it works just like the regular file upload dialog, but instead of a file
picker dialog the browser shows a camera dialog. Just like file upload, camera
capture happens only if the user presses the a button on an input[type="file"]
element, and just like the regular file picker dialog, the capture picker is
under the user's control so you can decide when to snap the picture, and
whether to upload the resulting image.

~~~
DrCatbox
So what does a user do if he wants to upload a file from the sd-card and not
take a picture to upload it!?

~~~
mbrubeck
In Firefox there are two buttons in the file input widget (when it includes
the accept="image/*" attribute): one to "browse" and one to "capture."

------
starwed
> _whether ARM processors will ever be able to execute JavaScript at native-
> like speeds is still unknown._

Does this have a secret meaning I can't discern, or is it just nonsense?

~~~
Raphael
HTML renderers often have choppy animation and transitions.

~~~
starwed
It was the bit about ARM processors that made no sense -- the author since
edited it out, since that wasn't the point he was trying to make! :)

------
peterwwillis
<rant> This brings up troubling thoughts of how the web (as well as personal
choice and a growing economic disparity) is being eroded by the senseless
advance of technology.

Recently someone's start-up website refused to work on my Android phone
because it didn't support WebSockets. I thought, "Wow, what a bunch of dicks.
Now I have to get a better phone that can run Firefox Mobile or something."
But I can ignore that one website.

Imagine every popular website requiring technology that only expensive
cutting-edge devices can utilize. At some point you'll have to have a certain
amount of disposable income just to browse the web. This should not be the
case; everyone on the planet should some day be able to use the internet to
the fullest given the most modest means. Even if you stick to non-mobile
surfing, is your current computer's operating system modern enough to run the
latest and greatest web browsing app? If you wanted to upgrade the OS, would
you be able to, considering how old your computer is?

The World Wide Web is not meant to be a platform for an operating system on
top of an operating system. It's meant to provide formatted data with inline
images and hyperlinks. A ubiquitous, universal, cross-platform resource for
information. I wonder if people consider accessibility anymore. </rant>

~~~
gkoberger
Wait, what? Why should we be holding back the web to satisfy your definition
of what the web should be?

It's up to websites to decide what technologies to take advantage of, as it's
always been. JavaScript is ubiquitous now, but it wasn't always -- some sites
used it, others didn't. The web didn't die, and eventually adoption became
widespread. Same goes for other advancements. If I want to browse Wikipedia, I
should be able to do so without having a top of the line computer running the
latest browser (although Firefox runs on just about anything). However, why
should we not allow someone to create, say, a multi-user realtime image
editor, merely because it doesn't run on your computer?

The irony of your rant is that these APIs are to help combat exactly what
you're afraid of. In theory, these APIs will eventually work on an iPhone, WP7
or Android phone. Currently, you need to buy an iPhone if you want to use an
iPhone app. These APIs were created in order to make "apps" platform agnostic,
via the web.

~~~
peterwwillis
Sure, assuming the device supports the API. We all know about Apple's fascist
policies about what its apps can and cannot do. They can always choose not to
support your app or your app's features if it's in their best interests.

Alas, I think you miss my point. It's not just that "the web isn't the web
anymore." It's that this push for more and more technology where it isn't
needed will eventually impede people's lives (and truly it is not needed - a
webpage that emulates an app should just be an app). It adds to the further
complexity and cost of the modern age without giving us something of fair
value in return. It's an unfair tax on humanity.

I understand that somebody has a need for a multi-user realtime image editor.
But that should be _an app_ , not a web page. Obviously not every device is
going to be able to do everything. But in most cases they could if they were
implemented the proper way.

I guess this kind of argument isn't for Hacker News. I'm the kind of guy who
wants to throw his smartphone away, who doesn't own a TV, who doesn't go on
Facebook. I'm not interested in giving chunks of my life over to consumerism
and mindless wastes of entertainment. And i'm not interested in pushing new
technology where it was never meant to be just because it _can_ be done.

By the way, JavaScript never should have been ubiquitous. It started as a hack
and now it's a monster.

