When using WebWorker setup from same html page
cannot use openDatabase to open a database?
Using script from:
http://www.whatwg.org/specs/web-workers/current-work/
as below
<script>
new Worker('worker.js');
</script>
The worker itself is as follows:
var server = new WebSocket('ws://whatwg.org/database');
var database = openDatabase('demobase', '1.0', 'Demo Database',
10240);
server.onmessage = function (event) {
// data is in the format "command key value"
var data = event.data.split(' ');
switch (data[0]) {
case '+':
database.transaction(function(tx) {
tx.executeSql('INSERT INTO pairs (key, value) VALUES (?, ?)',
data[1], data[2]);
});
case '-':
database.transaction(function(tx) {
tx.executeSql('DELETE FROM pairs WHERE key=? AND value=?',
data[1], data[2]);
});
}
};
Using 5.0.360.0 dev then run the page, right click to inspect element,
then click storage, you can view the localdb.
When we openDatabase from html page no problem, the localDB shows
here, but when trying to open with WebWorker as per above and other
minified attempts, localDB never opens and cannot be seen?
Any ideas?
--
You received this message because you are subscribed to the Google Groups "Chromium HTML5" group.
To post to this group, send email to chromiu...@chromium.org.
To unsubscribe from this group, send email to chromium-html...@chromium.org.
For more options, visit this group at http://groups.google.com/a/chromium.org/group/chromium-html5/?hl=en.
On Mon, Mar 29, 2010 at 9:24 AM, Eric Uhrhane <er...@google.com> wrote:
> Jeremy's right; I'm working on it, but it's not there yet. I hope to
> have it all working no later than two months from now.
On Mar 30, 4:08 am, Eric Uhrhane <er...@google.com> wrote:
> Trying again with group membership...
>
>
>
> On Mon, Mar 29, 2010 at 9:24 AM, Eric Uhrhane <er...@google.com> wrote:
> > Jeremy's right; I'm working on it, but it's not there yet. I hope to
> > have it all working no later than two months from now.
>
> > On Mon, Mar 29, 2010 at 2:34 AM, Jeremy Orlow <jor...@chromium.org> wrote:
> >> I believe the WebSQLDatabase support in Chromium is still not complete (and
> >> not yet implemented in any other browser).
> >> J
>
> >>> To post to this group, send email to chromium-ht...@chromium.org.
> >>> To unsubscribe from this group, send email to
> >>> chromium-html5+unsubscr...@chromium.org.