Re: [whatwg] Proposed updates for the command API's

2008-08-13 Thread Ian Hickson
On Wed, 13 Aug 2008, Dav Glass wrote: > > Why not do: > > function showInfo() { > > // do whatever you want with elements > > // ... > > } > > So what about if I did a document.execCommand('bold') on that selection? > I wouldn't be able to get the new elements with the above. > [...]

Re: [whatwg] Proposed updates for the command API's

2008-08-13 Thread João Eiras
As an implementer of a WYSIWYG editor, I would use this all the time: Inserting an Image and having a reference to it. Inserting HTML, then being able to filter the content. Hopefully capturing the change from a paste event so I can fix/filter the content. I fully agree we need

Re: [whatwg] Proposed updates for the command API's

2008-08-13 Thread Dav Glass
- Original Message From: Ian Hickson <[EMAIL PROTECTED]> > Why not do: > function showInfo() { > // do whatever you want with elements > // ... > } So what about if I did a document.execCommand('bold') on that selection? I wouldn't be able to get the new elements with the ab

Re: [whatwg] Proposed updates for the command API's

2008-08-13 Thread Ian Hickson
On Wed, 13 Aug 2008, Dav Glass wrote: > > If I wanted to make a button that took the selection, and opened a more > info window for extra data (just a simple example). Why not do: function showInfo() { // get a copy of the current selection ranges var ranges = []; var selecti

Re: [whatwg] HTML 5 : Misconceptions Documented

2008-08-13 Thread Ian Hickson
On Wed, 13 Aug 2008, Kristof Zelechovski wrote: > > While we are at collections and arrays, it is worth noting that the > {coll.length} attribute is a misnomer. I would always ask for > {coll.count} when I was learning and meditate upon why it did not work. It's too late to change that kind of

Re: [whatwg] WebWorkers vs. Threads

2008-08-13 Thread Aaron Boodman
On Wed, Aug 13, 2008 at 11:50 AM, Shannon <[EMAIL PROTECTED]> wrote: > The WebWorkers implementation (scary! hide your children!!): > > --- worker.js --- > updateGlobalLa = function (e) { > var localLa = someLongRunningFunction( e ); > workerGlobalScope.port.postMessage("set la = "+ localLa); > }

Re: [whatwg] WebWorkers vs. Threads

2008-08-13 Thread Shannon
Kristof Zelechovski wrote: A background task invoked by setTimeout has to be split to small chunks; _yielding_ occurs when each chunk ends (having called setTimeout to execute the next chunk). It is very hard to code in this way; you have to maintain an explicit stack and create an exit/entry po

Re: [whatwg] Proposed updates for the command API's

2008-08-13 Thread Darin Adler
Not sure this will be useful, but I thought it worth mentioning. Folks working on WebKit haven't proposed any execCommand extensions. But WebKit has a lot of editing commands that are alongside the execCommand ones, unavailable from JavaScript because we've done that intentionally to avoid

Re: [whatwg] Proposed updates for the command API's

2008-08-13 Thread Dav Glass
- Original Message From: Ian Hickson <[EMAIL PROTECTED]> > > > * ModifiedNodes - I think this would be better as a separate API, maybe > >"queryCommandAffected()" or something, that returns the collection. > >Also, maybe it should return a range rather than a collection. What i

Re: [whatwg] Joined blocks

2008-08-13 Thread Kristof Zelechovski
The concept of joint blocks (which should rather be named disjoint canvas) is relevant mainly to printouts. As it has already been explained in the booklet case, HTML is not the primary workhorse for preparing professional printouts. Window content is stretchable, unlike a print sheet, therefore

Re: [whatwg] WebWorkers vs. Threads

2008-08-13 Thread Paweł Stradomski
W liście Shannon z dnia środa 13 sierpnia 2008: > He wasn't against WebWorkers, he was, as you say, against full > threading (with all the mutexes and locks etc... exposed to the JS > author). I can't find the reference site but it doesn't really matter > except from the point of view that many p

Re: [whatwg] HTML 5 : Misconceptions Documented

2008-08-13 Thread Kristof Zelechovski
While we are at collections and arrays, it is worth noting that the {coll.length} attribute is a misnomer. I would always ask for {coll.count} when I was learning and meditate upon why it did not work. Chris -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of

Re: [whatwg] Proposed updates for the command API's

2008-08-13 Thread Ian Hickson
On Tue, 12 Aug 2008, Dav Glass wrote: > > > * ModifiedNodes - I think this would be better as a separate API, maybe > >"queryCommandAffected()" or something, that returns the collection. > >Also, maybe it should return a range rather than a collection. What is > >the use case? (How

Re: [whatwg] WebWorkers vs. Threads

2008-08-13 Thread Kristof Zelechovski
A background task invoked by setTimeout has to be split to small chunks; _yielding_ occurs when each chunk ends (having called setTimeout to execute the next chunk). It is very hard to code in this way; you have to maintain an explicit stack and create an exit/entry point at every chunk boundary.

Re: [whatwg] Scripted querying of capabilities

2008-08-13 Thread Kristof Zelechovski
All right, in that case I give up. It is plainly insane. The VIDEO element is for displaying movies, not for displaying funny messages that the user should install codec XYZ. If it cannot display the movie, it should display the fallback content provided. If the author wants the user to install

Re: [whatwg] WebWorkers vs. Threads

2008-08-13 Thread Shannon
Jonas Sicking wrote: Shannon wrote: I've been following the WebWorkers discussion for some time trying to make sense of the problems it is trying to solve. I am starting to come to the conclusion that it provides little not already provided by: setTimeout(mainThreadFunc,1) setTimeout(workThre