Re: IndexedDB Proposed API Change: cursor.advance BACKWARD when direction is prev

2014-05-23 Thread marc fawzi
- please use public-webapps for IDB discussions ] On 5/20/14 7:46 PM, marc fawzi wrote: Hi everyone, I've been using IndexedDB for a week or so and I've noticed that cursor.advance(n) will always move n items forward regardless of cursor direction. In other words, when the cursor direction

Re: IndexedDB Proposed API Change: cursor.advance BACKWARD when direction is prev

2014-05-23 Thread marc fawzi
, May 23, 2014 at 10:41 AM, Joshua Bell jsb...@google.com wrote: On Fri, May 23, 2014 at 9:40 AM, marc fawzi marc.fa...@gmail.com wrote: I thought .continue/advance was similar to the 'continue' statement in a for loop in that everything below the statement will be ignored and the loop would

Re: [Bug 25376] - Web Components won't integrate without much testing

2014-05-29 Thread marc fawzi
Excuse my unsolicited comment here, being new to the webapps mailing list, but here is my two cents feedback as a web developer... I think the idea behind Web Components is good regardless of the flaws on the spec. The idea is to create a standard built into the browser that will allow

Re: WebApp installation via the browser

2014-05-30 Thread marc fawzi
Another question about the subject https://developers.google.com/chrome/apps/docs/developers_guide This says that they can also run in the background, which is huge. I'm not sure if they support content scripts like extensions and packaged apps do. I would love to find out if the spec says

IndexedDB: MultiEntry index limited to 50 indexed values? Ouch.

2014-06-05 Thread marc fawzi
Hi Joshua, IDB folks, I was about to wrap up work on a small app that uses IDB but to my absolute surprise it looks that the number of indexed values in a MultiEntry index is limited to 50. Maybe it's not meant to contain an infinite number but 50 seems small and arbitrary. Why not 4096?

Re: IndexedDB: MultiEntry index limited to 50 indexed values? Ouch.

2014-06-05 Thread marc fawzi
or is a simple count() enough?) and for implementors to track down actual bugs. If you do find browser bugs, please report them - crbug.com, bugzilla.mozilla.org, etc. On Thu, Jun 5, 2014 at 2:15 PM, marc fawzi marc.fa...@gmail.com wrote: Hi Joshua, IDB folks, I was about to wrap up work on a small

Re: IDBObjectStore/IDBIndex.exists(key)

2014-06-21 Thread Marc Fawzi
I think the same thought pattern can be applied elsewhere in the API design for v2. Consider the scenario of trying to find whether a given index exists or not (upon upgradeneeded). For now, we have to write noisy code like [].slice.call(objectStore.indexNames()).indexOf(someIndex) Why couldn't

Re: IDBObjectStore/IDBIndex.exists(key)

2014-06-23 Thread Marc Fawzi
Joshua, you're on, and I'll be happy to make suggestions once I've thought them through... At least to some extent :) Jonas, There is a small performance difference between them though when applied to indexes. Indexes could have multiple entries with the same key (but different primaryKey),

Re: IDBObjectStore/IDBIndex.exists(key)

2014-06-23 Thread Marc Fawzi
was wondering what about a synchronous .exists() (the same proposal you had but synchronous as opposed to asynchronous) Makes any sense? Sent from my iPhone On Jun 23, 2014, at 1:28 PM, Jonas Sicking jo...@sicking.cc wrote: On Mon, Jun 23, 2014 at 1:03 PM, Marc Fawzi marc.fa...@gmail.com

Re: IDBObjectStore/IDBIndex.exists(key)

2014-06-23 Thread Marc Fawzi
We can do synchronous tests against the schema as it is feasible for implementations to maintain a copy of the current schema for an open connection in memory in the same thread/process as script. (Or at least, no implementer has complained.) Oh cool. So I could have a 3rd party component in

Re: Proposal for User Agent Augmented Authorization

2014-08-07 Thread Marc Fawzi
Probably a naive comment, but I'm curious and interested in learning since it's one thing that's been missing from browsers: Does your last comment mean that you'd be baking in dependency on a certain auth standard in the user agent? What happens when the part of the authentication model that is

Re: Encapsulating CSS in Shadow DOM

2014-08-20 Thread Marc Fawzi
Hmm. I thought that's part of the purpose of Web Component, i.e. to encapsulate CSS and JS? Is it not so? On Wed, Aug 20, 2014 at 1:42 AM, Henrik Haugberg henrik.haugb...@gmail.com wrote: I am hoping it will be possible to have root em like font size based values, but based on the shadow root

Re: Encapsulating CSS in Shadow DOM

2014-08-20 Thread Marc Fawzi
n/m ... the request is more specific than the email subject... the JS solution to the problem is certainly less appealing than a CSS only solution.. .will be watching this :) On Wed, Aug 20, 2014 at 9:20 AM, Marc Fawzi marc.fa...@gmail.com wrote: Hmm. I thought that's part of the purpose

Re: What I am missing

2014-11-18 Thread Marc Fawzi
Allowing this script to run may open you to all kinds of malicious attacks by 3rd parties not associated with the party whom you're trusting. If I give App XYZ super power to do anything, and XYZ gets compromised/hacked then I'll be open to all sorts of attacks. It's not an issue of party A

Re: What I am missing

2014-11-18 Thread Marc Fawzi
that the code is actually from the the certificate owner .. and has not been altered without the signers consent. Michaela On 11/19/2014 06:14 AM, Marc Fawzi wrote: Allowing this script to run may open you to all kinds of malicious attacks by 3rd parties not associated with the party

Re: What I am missing

2014-11-18 Thread Marc Fawzi
So there is no way for an unsigned script to exploit security holes in a signed script? Funny you mention crypto currencies as an idea to get inspiration from...Trust but verify is detached from that... a browser can monitor what the signed scripts are doing and if it detects a potentially

Re: What I am missing

2014-11-19 Thread Marc Fawzi
...@gmail.com wrote: On Wed, Nov 19, 2014 at 7:54 AM, Marc Fawzi marc.fa...@gmail.com wrote: So there is no way for an unsigned script to exploit security holes in a signed script? Of course there's a way. But by the same token, there's a way a signed script can exploit security holes in another signed

Re: do not deprecate synchronous XMLHttpRequest

2015-02-06 Thread Marc Fawzi
/06/2015 12:28 PM, Marc Fawzi wrote: I have several 8-track tapes from the early-to-mid 70s that I'm really fond of. They are bigger than my iPod. Maybe I can build an adapter with mechanical parts, magnetic reader and A/D convertor etc. But that's my job, not Apple's job. The point is, old

Re: do not deprecate synchronous XMLHttpRequest

2015-02-06 Thread Marc Fawzi
I have several 8-track tapes from the early-to-mid 70s that I'm really fond of. They are bigger than my iPod. Maybe I can build an adapter with mechanical parts, magnetic reader and A/D convertor etc. But that's my job, not Apple's job. The point is, old technologies die all the time, and people

Thread-Safe DOM // was Re: do not deprecate synchronous XMLHttpRequest

2015-02-11 Thread Marc Fawzi
part of the journey... Relax. On a more serious basis, please provide us with clarity or point us to discussions on this topic that might help us understand how to get _to_ there! On Tue, Feb 10, 2015 at 7:19 PM, Brendan Eich bren...@secure.meer.net wrote: Marc Fawzi wrote: I've recently

Re: do not deprecate synchronous XMLHttpRequest

2015-02-10 Thread Marc Fawzi
strong. Work there, above the standards. De-jure standardization will follow, and we'll all be better off for that order of work. /be Marc Fawzi wrote: How about a thread-safe but lock-free version of the DOM based on something like Clojure's atom? So we can manipulate the DOM from web

Re: do not deprecate synchronous XMLHttpRequest

2015-02-10 Thread Marc Fawzi
, and we'll all be better off for that order of work. /be Marc Fawzi wrote: How about a thread-safe but lock-free version of the DOM based on something like Clojure's atom? So we can manipulate the DOM from web workers? With cursor support? How about immutable data structures for side-effect

Re: do not deprecate synchronous XMLHttpRequest

2015-02-10 Thread Marc Fawzi
support), adds up to noise in this list. What good purpose does noise to signal serve? /be Marc Fawzi mailto:marc.fa...@gmail.com February 10, 2015 at 6:24 PM What? a good cop bad cop routine? Jonas asks for a constructive contribution or ideas for missing functionality in the web platform

Re: do not deprecate synchronous XMLHttpRequest

2015-02-10 Thread Marc Fawzi
Here is a really bad idea: Launch an async xhr and monitor its readyState in a while loop and don't exit the loop till it has finished. Easier than writing charged emails. Less drain on the soul. Sent from my iPhone On Feb 10, 2015, at 8:48 AM, Michaela Merz michaela.m...@hermetos.com

Re: do not deprecate synchronous XMLHttpRequest

2015-02-10 Thread Marc Fawzi
If readyState is async then have set a variable in the readyState change callback and monitor that variable in a while loop :D What am I missing? On Tue, Feb 10, 2015 at 9:44 AM, Elliott Sprehn espr...@chromium.org wrote: On Tuesday, February 10, 2015, Marc Fawzi marc.fa...@gmail.com wrote

Re: do not deprecate synchronous XMLHttpRequest

2015-02-10 Thread Marc Fawzi
Async xhr with callback let's you manage the flow such that you don't do anything until a successful response from the server. Promises make it even nicer. Sent from my iPhone On Feb 10, 2015, at 9:15 AM, George Calvert george.calv...@loudthink.com wrote: Ashley, Isn't it for the

Re: Thread-Safe DOM // was Re: do not deprecate synchronous XMLHttpRequest

2015-02-11 Thread Marc Fawzi
this backward compatibility stuff is making me think that the web is built upon the axiom that we will never start over and we must keep piling up new features and principles on top of the old ones this has worked so far, miraculously and not without overhead, but I can only assume that it's at

Re: Shadow tree style isolation primitive

2015-01-12 Thread Marc Fawzi
Can someone shed light at why Scoped Style Element was removed from Chrome experimental features? http://caniuse.com/#feat=style-scoped In suggesting @isolate declaration, I meant it would go inside a scoped style element. If there are nested scope style elements and each have @isolate then it

Re: Shadow tree style isolation primitive

2015-01-12 Thread Marc Fawzi
If the goal is to isolate a style sheet or several per a DOM sub tree then why not just use scoped style element that has imports that apply the stylesheet(s) only to the sub tree in scope? Obviously, you are talking about preventing stylesheets applied at a higher level from leaking in. So

Re: do not deprecate synchronous XMLHttpRequest

2015-02-10 Thread Marc Fawzi
my iPhone On Feb 10, 2015, at 1:09 PM, Jonas Sicking jo...@sicking.cc wrote: On Tue, Feb 10, 2015 at 12:51 PM, Marc Fawzi marc.fa...@gmail.com wrote: i agree that it's not a democratic process and even though some W3C/TAG people will engage you every now and then the end result

Re: do not deprecate synchronous XMLHttpRequest

2015-02-10 Thread Marc Fawzi
think maybe aside from the thread-safe DOM idea, everything below that should belong to the ES7 discussion list. On Tue, Feb 10, 2015 at 1:46 PM, Marc Fawzi marc.fa...@gmail.com wrote: How about a thread-safe but lock-free version of the DOM based on something like Clojure's atom? So we can

Re: Thread-Safe DOM // was Re: do not deprecate synchronous XMLHttpRequest

2015-02-12 Thread Marc Fawzi
AM, Aryeh Gregor a...@aryeh.name wrote: On Thu, Feb 12, 2015 at 4:45 AM, Marc Fawzi marc.fa...@gmail.com wrote: how long can this be sustained? forever? what is the point in time where the business of retaining backward compatibility becomes a huge nightmare? It already is, but there's

Re: Thread-Safe DOM // was Re: do not deprecate synchronous XMLHttpRequest

2015-02-13 Thread Marc Fawzi
Travis, That would be awesome. I will go over that link and hopefully have starting points for the discussion. My day job actually allows me to dedicate time to experimentation (hence the ClojureScript stuff), so if you have any private branches of IE with latest DOM experiments, I'd be very

Re: Thread-Safe DOM // was Re: do not deprecate synchronous XMLHttpRequest

2015-04-02 Thread Marc Fawzi
-webapps. I cited roc's blog post about custom view scrolling, which seems to fall under Travis's (1) above. Please don't feel rejected about any of these work items. /be Marc Fawzi mailto:marc.fa...@gmail.com February 13, 2015 at 12:45 PM Travis, That would be awesome. I will go over

Re: Indexed DB + Promises

2015-09-28 Thread Marc Fawzi
think of is a timeout that is configurable on waitUntil, e.g. waitUntil(new Promise()).maxTime(30s) On Mon, Sep 28, 2015 at 12:36 PM, Joshua Bell <jsb...@google.com> wrote: > On Mon, Sep 28, 2015 at 11:42 AM, Marc Fawzi <marc.fa...@gmail.com> wrote: > >> Have you looked at ES7 as

Re: Indexed DB + Promises

2015-09-28 Thread Marc Fawzi
fig. On Mon, Sep 28, 2015 at 1:12 PM, Marc Fawzi <marc.fa...@gmail.com> wrote: > Yes, sorry. > > < underlying issue of mixing IDB+Promises remains. >> > > That's for implementors such as yourself to work through, I had assumed. > > I just went over the Readme fro

Re: Indexed DB + Promises

2015-09-28 Thread Marc Fawzi
Have you looked at ES7 async/await? I find that pattern makes both simple as well as very complex (even dynamic) async coordination much easier to deal with than Promise API. I mean from a developer perspective. Sent from my iPhone > On Sep 28, 2015, at 10:43 AM, Joshua Bell

Re: Indexed DB + Promises

2015-09-28 Thread Marc Fawzi
How about using ES7 decorators, like so: @idb_promise function () { //some code that uses the IDB API in Promise based way } and it would add .promise to the IDB APIs On Mon, Sep 28, 2015 at 1:26 PM, David Rajchenbach-Teller < dtel...@mozilla.com> wrote: > On 28/09/15 22:14, M