Any support for W3C File API planned?

18 views
Skip to first unread message

Bjorn Tipling

unread,
Feb 11, 2010, 3:49:22 PM2/11/10
to Chromium-extensions
http://www.w3.org/TR/FileAPI/

I would like to read MP3 IDE tags as described here for Firefox my
Chrome extensions:

http://hacks.mozilla.org/2009/12/w3c-fileapi-in-firefox-3-6/

This would require access to

var binaryReader = new FileReader();
filereader.readAsBinaryString(file);


Bjorn Tipling

unread,
Feb 11, 2010, 4:28:59 PM2/11/10
to Chromium-extensions
You know I could probably call this:

http://blog.nihilogic.dk/2008/08/reading-id3-tags-with-javascript.html

From a contentscript, which would be in the context of the origin
domain right? So no cross domain issues in doing xhr's?

I think this is gonna rock! :o

Ronald Schouten

unread,
Feb 11, 2010, 5:42:14 PM2/11/10
to Bjorn Tipling, Chromium-extensions
You can only perform a cross-domain XHR from the background page. But messages can pass back forth between your content scripts and your background page.

--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To post to this group, send email to chromium-...@chromium.org.
To unsubscribe from this group, send email to chromium-extens...@chromium.org.
For more options, visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/?hl=en.


Bjorn Tipling

unread,
Feb 11, 2010, 5:54:09 PM2/11/10
to Chromium-extensions
Unfortunately I hit reply to author, so I just wanted to paste the
discussion that went off list for the benefit of others:

(Thanks Ronald)

On Feb 11, 2010, at 2:51 PM, Ronald Schouten wrote:

I suspect you cannot make any XHR requests from the content script. I
cannot say for sure as I have not tried, But from my experience, the
content script does not seem to be associated with the domain in the
Omnibar. You can, however, set permissions in the manifest to allow
access to any site from the background page. Something like:

http://*/*, https://*/*

On Fri, Feb 12, 2010 at 7:46 AM, Bjorn Tipling
<bjorn....@gmail.com> wrote:
In the contentscript I can make XHR requests to the location of the
current open tab the contentscript is running in yes? Otherwise I have
to have a list of of domains in my manifest right? The thing is I
don't know which URL I need to do the cross domain request to before
hand, so I can't rely on the manifest. I need to get the MP3 data from
where ever it is stored, which maybe anywhere.

On Feb 11, 2:42 pm, Ronald Schouten <ron.schou...@gmail.com> wrote:
> You can only perform a cross-domain XHR from the background page. But
> messages can pass back forth between your content scripts and your
> background page.
>

> On Fri, Feb 12, 2010 at 6:28 AM, Bjorn Tipling <bjorn.tipl...@gmail.com>wrote:
>
>
>
> > You know I could probably call this:
>
> >http://blog.nihilogic.dk/2008/08/reading-id3-tags-with-javascript.html
>
> > From a contentscript, which would be in the context of the origin
> > domain right? So no cross domain issues in doing xhr's?
>
> > I think this is gonna rock! :o
>
> > On Feb 11, 12:49 pm, Bjorn Tipling <bjorn.tipl...@gmail.com> wrote:
> > >http://www.w3.org/TR/FileAPI/
>
> > > I would like to read MP3 IDE tags as described here for Firefox my
> > > Chrome extensions:
>
> > >http://hacks.mozilla.org/2009/12/w3c-fileapi-in-firefox-3-6/
>
> > > This would require access to
>
> > > var binaryReader = new FileReader();
> > > filereader.readAsBinaryString(file);
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Chromium-extensions" group.

> > To post to this group, send email to chromium-extensi...@chromium.org.


> > To unsubscribe from this group, send email to

> > chromium-extensions+unsubscr...@chromium.org<chromium-extensions%2Bunsubscr...@chromium.org>

PhistucK

unread,
Feb 12, 2010, 3:57:39 AM2/12/10
to Bjorn Tipling, Chromium-extensions
For more information regarding the HTML5\Web Platform features status -
http://dev.chromium.org/developers/web-platform-status#TOC-File-API

☆PhistucK


--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To post to this group, send email to chromium-...@chromium.org.
To unsubscribe from this group, send email to chromium-extens...@chromium.org.
Reply all
Reply to author
Forward
0 new messages