W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2009

Re: [File API] feedback on August 1/5 draft

From: Anne van Kesteren <annevk@opera.com>
Date: Sat, 08 Aug 2009 15:25:03 +0200
To: "Jonas Sicking" <jonas@sicking.cc>
Cc: "WebApps WG" <public-webapps@w3.org>
Message-ID: <op.uych71x764w2qv@anne-van-kesterens-macbook.local>
On Fri, 07 Aug 2009 02:19:21 +0200, Jonas Sicking <jonas@sicking.cc> wrote:
> For example an web HTML editor. The editor lets you wysiwyg edit the
> page as well as drop in images. Dropping in images creates a <img
> src="uri-here" alt="..."> element. The edited page can then be saved
> in localStorage, sent to the server using XHR, or posted to a parent
> iframe using postMessage.
> It's possible, but very clunky, to always send images separately and
> then refresh the inline uris any time the page is to be displayed.

Fair enough.

>>> It seems useful to use the same code for people that want to display
>>> error messages to the user, this way you can either pass the value in
>>> the DOM event or from an exception to the same function.
>> If you use the same constant name you can still do that.
> I don't understand. The use case is:
> A page has a function to deal with displaying error messages to the
> user. The function looks something like:
> function displayError(errorNumber) {
>   var errorString = getLocalizedErrorMessage(errorNumber);
>   document.getElementById("errorMessage").nodeValue = errorString;
>   errorDialog.classList.add("displayed");
>   cancelTimeout(gErrorUITimeout);
>   gErrorUITimeout = setTimeout(hideError, 5000);
> }

If instead of errorNumber you passed the object you could do things like

   if (obj.SECURITY_ERR == obj.code) {

which is what I meant.

Also, I'll note that you carefully snipped my inconsistency argument!

Anne van Kesteren
Received on Saturday, 8 August 2009 13:25:46 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:18 UTC