Re: [JSMentors] Fun interview question with function expressions

2011-09-08 Thread Dmitry Pashkevich
Dmitry, Peter, thanks a lot for the explanation! Now it's much clearer to me. -- To view archived discussions from the original JSMentors Mailman list: http://www.mail-archive.com/jsmentors@jsmentors.com/ To search via a non-Google archive, visit here:

[JSMentors] Re: spaces in attribute values

2011-09-08 Thread Scott Sauyet
Nathan Sweet wrote: [ ... ] [T]he more I delve into building my engine the more I see that the philosophical argument for using CSS is weak and tenuous. I'm planning on building another engine soon that only works for the latest browsers only (a sort of high-end engine

Re: [JSMentors] Re: spaces in attribute values

2011-09-08 Thread Nick Morgan
On 8 September 2011 12:30, Scott Sauyet scott.sau...@gmail.com wrote: Nathan Sweet wrote: [ ... ]                          [T]he more I delve into building my engine the more I see that the philosophical argument for using CSS is weak and tenuous. I'm planning on building another engine soon

RE: [JSMentors] Re: spaces in attribute values

2011-09-08 Thread Cheney, Austin
how often do we really need to target something that can't be expressed with CSS? All the time. How can I target the following with CSS? * parent * last child * prior sibling * next sibling * first n named child of parent j * third n named child of parent j * first descendant of any name with

RE: [JSMentors] Re: spaces in attribute values

2011-09-08 Thread Cheney, Austin
CSS, though, was designed for progressive rendering (the only exceptions I can come up with are the `:nth-last-*` selectors), whereas XPath really only makes sense on a full DOM. I think that explains much of the difference. I can't say I fully agree. I don't think progressive rendering

[JSMentors] Re: spaces in attribute values

2011-09-08 Thread Scott Sauyet
Austin Cheney wrote: Scott Sauyet wrote: how often do we really need to target something that can't be expressed with CSS? All the time.  How can I target the following with CSS? * parent Can't do this, by design. This would be the primary advantage to XPath * last child p

RE: [JSMentors] Re: spaces in attribute values

2011-09-08 Thread Cheney, Austin
On the other hand, can you find any better way to mimic `p.foo` than the following?: I would just use //p[@class = foo] Of course, this looks for a class attribute whose value is only foo. Outside of jQuery I see absolutely no value in supplying multiple values to a class attribute. But if you

Re: [JSMentors] Re: WebGl shape recognition

2011-09-08 Thread Poetro
2011/9/8 Patrick Horgan phorg...@gmail.com: All the examples from that page fail for me with a javascript error: Error: G[i] is null Source File: http://webcodingeasy.com/my_classes/js/canvas_events/canvas_events.packed.js Line: 14 I didn't bother looking any further, thinking that if

Re: [JSMentors] Re: WebGl shape recognition

2011-09-08 Thread Diego Perini
All the examples in that page works for me too in Firefox, Opera and Safari/Chrome. One thing I noticed is that with Firefox 6.02 one have to initially mouseout from the browser area or blur the main windows once, then everything works. I am not clear yet why this is happening only in Firefox. I

[JSMentors] Re: spaces in attribute values

2011-09-08 Thread Scott Sauyet
Austin Cheney wrote: Scott Sauyet wrote: CSS, though, was designed for progressive rendering (the only exceptions I can come up with are the `:nth-last-*` selectors), whereas XPath really only makes sense on a full DOM.  I think that explains much of the difference. I can't say I fully