[JSMentors] Re: Blog post(s) review

2012-01-22 Thread jdalton
@Garrett Johnson: On your "es-harmony-part-one" post I think you should stress that while JavaScript 1.8 (since 2007), currently 1.8.2 (since 2009), may have influenced Harmony it is a dialect of ECMAScript developed by Mozilla. https://developer.mozilla.org/en/New_in_JavaScript_1.8 Also on your

[JSMentors] Re: Blog post(s) review

2012-01-20 Thread jdalton
@Garrett Johnson: I noticed this in your summary of what Harmony is: "It will ultimately form what will become sixth edition of ES." Check out this post on how /be describes Harmony: https://lists.webkit.org/pipermail/webkit-dev/2011-December/018914.html - JDD -- To view archived discussions f

[JSMentors] Re: How to restore Object.prototype.hasOwnProperty if it has been overwritten?

2011-08-27 Thread jdalton
> > I tried in Chrome and deleting just doesnt work... > > Deleting hasOwnProperty just... deletes it > > Ack, yes, my bad. That only works for the properties on, e.g., > Object.prototype, not the ones on Object itself. It doesn't work in Chrome on properties of Object.prototype either: http://js

[JSMentors] Re: How to restore Object.prototype.hasOwnProperty if it has been overwritten?

2011-08-27 Thread jdalton
> In some browsers, Safari and Chrome at least, deleting the bad value will > reveal the original value again. Just to clarify this special behavior does *not* happen in Chrome (old - canary) or Safari < 5. - JDD -- To view archived discussions from the original JSMentors Mailman list: http:/

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

2011-02-07 Thread jdalton
> Really? I'm asking because I didn't actually test that and it > surprisese me. If the TABLE contains a TR then a TBODY must be created > implicitly. According to DOM spec. Yap, that's what the tests suggest. What's interesting is that though some browsers allow setting the innerHTML of a table

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

2011-02-06 Thread jdalton
@Lasse Reichstein > The test checks whether the value set as innerHTML is the same as > the one read back afterwards. There is nothing that suggests that > this must be the case. The formatting of the values read from innerHTML > is not specified. E.g., if there is an element with multiple attribut

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

2011-02-06 Thread jdalton
> You've given a test, in singular, which is not the same as test*s*, I gave 5 tests (colgroup, optgroup, select, scripts, tables). > table created with a tbody, that can hardly be considered a bug, when tables > have been being created automatically with tbodys for ages The spec says they c

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

2011-02-06 Thread jdalton
@Jorge We have given you tests, plz troll elsewhere. -- 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 unsubs

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

2011-02-06 Thread jdalton
@Jorge: Shows Chrome 11 and Safari 5 failing at least 1 of the tests: http://jsbin.com/ipowa4 > LOL, March, 7, 2007 ? That must have been Safari 2.x :-))) Are you The poster said that the bug was old but still exists (maybe in mobile). - JDD -- To view archived discussions from the origin

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

2011-02-06 Thread jdalton
> That url gives me "Sorry, no posts matched your criteria." > Remove the trailing `-` from the url. http://bit.ly/eDSgvi -JDD -- 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 jdalton
> But I wanted to point out that unlike in IEs there's not any problem(s) with > innerHTML in Chrome nor in Safari nor in Firefox nor in Opera. Only in > Microsoft's Internet Explorer(s). Not so, while working on FuseJS (I also see checks in jQuery) I noticed several browsers, not just IE, have

[JSMentors] Re: var declaration

2011-01-25 Thread jdalton
@Adrian Olaru: To reiterate what Peter and Miller said, these kind are differences are insignificant. I remember running across this jsperf test a few days ago. The results are indistinguishable from each other and are of such a high ops/sec rate that any minor difference is overlooked. http://jsp

[JSMentors] Re: scroll values only active on document.body (Chrome)

2011-01-23 Thread jdalton
> I wasn't reading closely enough. I see you add the div if the > documentElement.clientWidth is not 0.Though it still has the effect of > making the scrollHeight 1 in that document. I'm not sure why that > is. My detection method was actually part of another feature test looking for the root

[JSMentors] Re: JS API Design - Accepting Parameters

2011-01-13 Thread jdalton
I took a combo approach on a recent project: https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L81 // I allow `fn` because test `fn` is required new Benchmark(fn); // or a name first because other devs require a name too (an options object for just a name is bulky) and... new

[JSMentors] Re: Detecting and reporting user defined global variables

2011-01-13 Thread jdalton
I remember @kangax made a bookmarklet to do this that uses an iframe's untouched global for comparisons. https://github.com/kangax/detect-global -- To view archived discussions from the original JSMentors Mailman list: http://www.mail-archive.com/jsmentors@jsmentors.com/ To search via a non-Goo

[JSMentors] Re: Internet Explorer event handler leaks

2011-01-10 Thread jdalton
> Yes, I modified the test to switch between standards and quirks and it > leaks on both. I meant, no. No difference between quirks and standards mode. They both leak. -- To view archived discussions from the original JSMentors Mailman list: http://www.mail-archive.com/jsmentors@jsmentors.com/

[JSMentors] Re: Internet Explorer event handler leaks

2011-01-10 Thread jdalton
> Yep. But is there a different result in standards mode? > > That test case is in quirks mode. Yes, I modified the test to switch between standards and quirks and it leaks on both. - JDD -- To view archived discussions from the original JSMentors Mailman list: http://www.mail-archive.com/jsm

[JSMentors] Re: Internet Explorer event handler leaks

2011-01-10 Thread jdalton
> I'm busy. Misinformation's no good right? What should I do? No worries. I am a night owl and created a test and a screencast. http://screenr.com/UBz http://dl.dropbox.com/u/513327/ieleak/test.html So the leak happens with a meta refresh, manual refresh, and navigating between multiple pages.

[JSMentors] Re: Internet Explorer event handler leaks

2011-01-10 Thread jdalton
@Garrett - I would rather you present a test case where it doesn't work. Asking someone to do a web search is kind of a copout. So far you have just presented doubt based on nothing (no test case), while others have presented working test cases with reproducible results. -JDD -- To view archived

[JSMentors] Re: Internet Explorer event handler leaks

2011-01-10 Thread jdalton
The reduced test case (using a single page refresh) is fine. It shows evidence of the memory leak and it's removal. It is understood that users don't refresh a page over and over (though it might happen with sites like ebay), and will more likely be visiting a site that uses the script on every pag

[JSMentors] Re: Request for code review: noodles - Async/non-blocking/CPS versions of the higher order functions on `Array.prototype`

2011-01-09 Thread jdalton
Hiya, Instead of having `noodles` return a new manually augmented object you can have it utilize noodles.prototype https://github.com/fitzgen/noodles/blob/master/noodles.js#L47-56 // private function Klass() { } noodles = exports.noodles = function (items) { var instance = new Klass; instanc

[JSMentors] Re: select text from an element and insert into another element

2011-01-07 Thread jdalton
@Daniel Donaldson Assuming the content of '.take li' is only text and you are working with an HTML (not XHTML) doc you could get away with: $('.take li').click(function() { // I avoided using innerText or textContent for simplicity $('.place').append(this.innerHTML); }); If you're us

[JSMentors] Re: Prototype

2011-01-07 Thread jdalton
> It has a long history and wide support, but I'm not sure I think it's > necessarily that great. It provides a functionality that is not matched by any existing proposal or implementation. I gave one example of a creative use for it that helps solve a problem, augmenting native prototypes, that

[JSMentors] Re: Prototype

2011-01-07 Thread jdalton
> But I've heard Brenden Eich doesn't think __proto__ is a good idea anymore. __proto__ is great, has a long history of support (at least 13yrs), and is now supported by every major browser (Safari, Chrome, Firefox, Opera), except IE. It's also available in server-side JS enviros like Narwhal, Ri

[JSMentors] Re: Prototype

2011-01-07 Thread jdalton
> But I've heard Brenden Eich doesn't think __proto__ is a good idea anymore. __proto__ is great, has a long history of support (at least 13yrs), and is now supported by every major browser (Safari, Chrome, Firefox, Opera), except IE. It's also available in server-side JS enviros like Narwhal, Ri