[JSMentors] Re: What are the alternatives to "var self = this"?

2011-03-16 Thread Jorge
that a much more appropriate term for `this` would be the "receiver" (a smalltalk-ism, afaict), or the "receiving object" (if it were not because in ES5 strict it may not be an object), or , but *not* "context", please. The "context" is another !==

[JSMentors] Re: JavaScript. Array "extras" in detail.

2011-03-01 Thread Jorge
On Feb 26, 12:39 pm, And Clover wrote: > > Nope: Array.prototype.* are only defined to work generically for native > JS objects, not host objects. Note that nowadays 99.99% of the times host objects are native, both in browsers and in ssjs, except in Microsoft's products. -- Jorg

[JSMentors] Re: innerHTML or document.createElement or both?

2011-02-06 Thread Jorge
On Feb 7, 3:56 am, Jorge wrote: > On Feb 7, 3:34 am, Miller Medeiros wrote: > > > this code here:http://pastebin.com/KAbQKDJN(postedby rmurphey a couple > > weeks ago) -  doesn't work all the times inside a webview.. but I haven't > > seen it fail inside t

[JSMentors] Re: innerHTML or document.createElement or both?

2011-02-06 Thread Jorge
t;leaks", you should ignore him too. Because these are bugs exclusive of IEs. As 99.99% of the bugs of .innerHTML. -- Jorge. -- 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, vis

[JSMentors] Re: innerHTML or document.createElement or both?

2011-02-06 Thread Jorge
ggy" table. >  and my test showed Chrome auto inserted them while Safari did not, > and Safari bugged on colgroup. What exactly did your safari do wrong wrt the colgroup ? -- Jorge. -- To view archived discussions from the original JSMentors Mailman list: http://www.mail-archive.com/jsm

[JSMentors] Re: innerHTML or document.createElement or both?

2011-02-06 Thread Jorge
On Feb 7, 3:34 am, Miller Medeiros wrote: > On Sun, Feb 6, 2011 at 8:10 PM, Jorge wrote: > > On Feb 7, 1:02 am, Miller Medeiros wrote: > > > > my app should also run inside a WebView > > > In any case. Mobile Safari is a webview too. > > in theory they are th

[JSMentors] Re: innerHTML or document.createElement or both?

2011-02-06 Thread Jorge
On Feb 7, 3:15 am, Diego Perini wrote: > On Mon, Feb 7, 2011 at 3:02 AM, Jorge wrote: > > > navigator.userAgent > > "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_6; en-us) AppleWebKit/ > > 534.19+ (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4" > > &q

[JSMentors] Re: innerHTML or document.createElement or both?

2011-02-06 Thread Jorge
On Feb 7, 3:14 am, jdalton wrote: > @Jorge We have given you tests, plz troll elsewhere. You've given a test, in singular, which is not the same as test*s*, in plural, and what it shows is a table created with a tbody, that can hardly be considered a bug, when tables have been being

[JSMentors] Re: innerHTML or document.createElement or both?

2011-02-06 Thread Jorge
On Feb 7, 2:26 am, Diego Perini wrote: > On Mon, Feb 7, 2011 at 1:58 AM, Jorge wrote: > > On Feb 7, 12:35 am, jdalton wrote: > >> @Jorge: > > >>   Shows Chrome 11 and Safari 5 failing at least 1 of the tests: > >>  http://jsbin.com/ipowa4 > > > I

[JSMentors] Re: innerHTML or document.createElement or both?

2011-02-06 Thread Jorge
On Feb 7, 2:18 am, Diego Perini wrote: > On Mon, Feb 7, 2011 at 1:17 AM, Jorge wrote: > > On Feb 7, 12:46 am, Diego Perini wrote: > > >> Those were the bugs I found advice for here: > > >>    http://webbugtrack.blogspot.com/2009/08/bug-179-innerhtml-love-

[JSMentors] Re: innerHTML or document.createElement or both?

2011-02-06 Thread Jorge
builds the page from the .html. In other words, if you can't trust it, you can't trust anything in the page. > thanks for all the answers so far, I didn't knew about some of the bugs > (never tried to use innerHTML outside the body tag). Nor tried to insert another

[JSMentors] Re: innerHTML or document.createElement or both?

2011-02-06 Thread Jorge
On Feb 7, 12:35 am, jdalton wrote: > @Jorge: > >   Shows Chrome 11 and Safari 5 failing at least 1 of the tests: >  http://jsbin.com/ipowa4 It's quite debatable whether it's a bug to create a table with a tbody... > > LOL, March, 7, 2007 ? That must have been Safa

[JSMentors] Re: innerHTML or document.createElement or both?

2011-02-06 Thread Jorge
Surely, if you dig enough in the bugtrackers, you're going to find bugs in some DOM methods too, are you going to "advice" against using them too ? > I haven't tested all these bugs myself on all platforms and Webkit > versions but I must believe to those, at least tho

[JSMentors] Re: innerHTML or document.createElement or both?

2011-02-06 Thread Jorge
On Feb 6, 9:24 pm, Jorge wrote: > And innerHTML is no more any faster than DOM methods, at least not in > webkits:http://jsperf.com/dom-methods-vs-innerhtml s/any faster/much faster/g -- Jorge. -- To view archived discussions from the original JSMentors Mailman list: http://ww

[JSMentors] Re: innerHTML or document.createElement or both?

2011-02-06 Thread Jorge
On Feb 6, 11:57 pm, Diego Perini wrote: > On Sun, Feb 6, 2011 at 7:54 PM, Jorge wrote: > > > innerHTML known problems ? In Chrome/Safari ? No. Sorry but no, sorry. > > Perhaps in IEs... > > I didn't specify which browsers are affected by ".innerHTML"

[JSMentors] Re: innerHTML or document.createElement or both?

2011-02-06 Thread Jorge
On Feb 6, 11:57 pm, Diego Perini wrote: > On Sun, Feb 6, 2011 at 7:54 PM, Jorge wrote: > > On Feb 6, 4:25 pm, Diego Perini wrote: > > >> By creating elements using DOM methods you are doing it correctly. If > >> you can completely avoid using ".innerHTML&

[JSMentors] Re: innerHTML or document.createElement or both?

2011-02-06 Thread Jorge
On Feb 6, 11:55 pm, jdalton wrote: > > That url gives me "Sorry, no posts matched your criteria." > > Remove the trailing `-` from the url.http://bit.ly/eDSgvi LOL, March, 7, 2007 ? That must have been Safari 2.x :-))) Are you kidding ? -- Jorge. -- To view archive

[JSMentors] Re: innerHTML or document.createElement or both?

2011-02-06 Thread Jorge
node references and rewrites the element's > contents from scratch. Of course. That's what innerHTML does. -- Jorge. -- 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, visi

[JSMentors] Re: innerHTML or document.createElement or both?

2011-02-06 Thread Jorge
a couple weeks > ago:http://twitter.com/rmurphey/status/27914215951962112- and it seems that > the > problem occur even without setting the `location.hash`.. That's Phonegap in a webview in a native app... -- Jorge. -- To view archived discussions from the original JSMentors M

[JSMentors] Re: JSMentors - logo designer

2011-02-06 Thread Jorge
On Feb 6, 9:16 pm, Asen Bozhilov wrote: > > The problem is that, while we are non commercial organization, we are > not able to give money prize to winner. No need to give money, just give and iPad :-) -- Jorge. -- To view archived discussions from the original JSMentors Mailman li

[JSMentors] Re: innerHTML or document.createElement or both?

2011-02-06 Thread Jorge
And innerHTML is no more any faster than DOM methods, at least not in webkits: http://jsperf.com/dom-methods-vs-innerhtml -- Jorge. -- 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

[JSMentors] Re: innerHTML or document.createElement or both?

2011-02-06 Thread Jorge
On Feb 6, 8:23 pm, Miller Medeiros wrote: > On Sun, Feb 6, 2011 at 1:54 PM, Jorge wrote: > > On Feb 6, 4:25 pm, Diego Perini wrote: > > > > By creating elements using DOM methods you are doing it correctly. If > > > you can completely avoid using ".innerHTML&q

[JSMentors] Re: developing and debugging node.js apps

2011-02-06 Thread Jorge
n - but let's not start a "my editor is > better" post). > > Is a debugger still too much to ask for currently? should I simply log stuff > to the console? npm install node-inspector gives you the same (gorgeous) debugger that's in Chrome/Safari. See: http://www.yout

[JSMentors] Re: innerHTML or document.createElement or both?

2011-02-06 Thread Jorge
o. Sorry but no, sorry. Perhaps in IEs... -- Jorge. -- 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: http://www.mail-archive.com/jsmentors@googlegroups.com/ To unsubscribe

[JSMentors] Re: jslint "Move all 'var' declarations to the top of the function." is now a critical error

2011-01-19 Thread Jorge
On Jan 19, 3:22 pm, Balázs Galambosi wrote: > 2011/1/19 Jorge : > > > I sometimes just don't declare them with var but as parameters: > > > function (x) { > >  var a,b; > >  ... > > } > > > function (x, a, b) { ... } > > That is an aw

[JSMentors] Re: jslint "Move all 'var' declarations to the top of the function." is now a critical error

2011-01-19 Thread Jorge
d. I sometimes just don't declare them with var but as parameters: function (x) { var a,b; ... } function (x, a, b) { ... } -- Jorge. -- To view archived discussions from the original JSMentors Mailman list: http://www.mail-archive.com/jsmentors@jsmentors.com/ To search via a non-G

[JSMentors] Re: Recommending this group

2011-01-19 Thread Jorge
On Jan 15, 9:49 pm, Rey Bango wrote: > (...) > Many of the same top-level developers that frequent C.L.JS can be found here And in-my-humble-opinion some of the worse who poisoned cljs, too. So beware. > offering fantastic advice. (...) at times, literally fantastic :-/ -- Jorge. --

[JSMentors] Re: setInterval overhead

2011-01-14 Thread Jorge
In short, the MTDs are either 4 or 10 ms, and only Opera allows timeouts of 1ms but not of 0ms. -- Jorge. -- 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: http://www.m

[JSMentors] Re: setInterval overhead

2011-01-14 Thread Jorge
gt; > })() To really mimic setInterval you've got to put the setTimeout at the very beginning of foo, before the alert. (function foo(){ setTimeout(foo, 1); alert('I will get called on page load and after 10 seconds again and again without setInterval :)'); })() -- Jo

[JSMentors] Re: JS API Design - Accepting Parameters

2011-01-13 Thread Jorge
nctionality a lot easier than > with option A.  Does anyone have advice or common pitfalls when taking > approach B?  I appreciate any input. > Perhaps, if that's a *method*, you should not be passing any parameters... :-) poligon.points= ...; poligon.options= ...; poligon.draw(); --

[JSMentors] Re: "void" function ?

2011-01-13 Thread Jorge
On Jan 12, 4:06 pm, Peter van der Zee wrote: > For a detailed concrete parse tree see: > > http://esparser.qfox.nl/#runnow:on,code:void-0 > > (hover mouse to see name of each node) Awesome! -- Jorge. -- To view archived discussions from the original JSMentors Mailman list:

[JSMentors] Re: "void" function ?

2011-01-12 Thread Jorge
t;moar"; > ... return[some,array]; > etc. > > (I'm still in favor of adding the space! But in terms of the spec, the space > is only required to make a distinction.) void-0 -> undefined -- Jorge. -- To view archived discussions from the original JSMentors Mailman lis