[Prototype-core] Re: Suggested alteration to PrototypeJS' Object.keys implementation.

2010-10-21 Thread kangax
On Oct 21, 12:11 pm, Andy E andyearns...@gmail.com wrote: kangax: I was thinking the same earlier (about caching the hasOwnProperty), when I realized that my method incorrectly doesn't allow functions to be passed (not sure about Prototype's original one).  I've updated the function on my

[Prototype-core] Re: Extra underscore in Ajax.Request.parameters

2009-11-23 Thread kangax
(but not any other lower version of 2.x), so if 2.0.4 is affected by this bug, we can't just drop it. [...] -- kangax -- You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group, send email to prototype-core@googlegroups.com

[Prototype-core] Re: innerText vs textContent

2009-10-23 Thread kangax
(remember that regex would still be fragile). If, on the other hand, it's all about speed — use textContent/innerText and take care of discrepancies as needed. -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[Prototype-core] Re: Function.EMPTY and Function.K

2009-10-16 Thread kangax
On Oct 16, 9:14 am, Ryan Gahl ryan.g...@gmail.com wrote: Are you sure not Function.eMpTy ? Would the order of capitalization be based on phase of the moon? [...] -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[Prototype-core] Re: Event#element deprecated?

2009-10-08 Thread kangax
On Oct 8, 8:24 am, T.J. Crowder t...@crowdersoftware.com wrote: Hi Tobie, Event#element has been deprecated for the longest time. Where?  Certainly not in the old API docs:http://prototypejs.org/api/event/element Thanks, T.J. I thought I was going crazy. [...] -- kangax

[Prototype-core] Re: Observing objects

2009-10-07 Thread kangax
with 4 observable methods, those methods are also unique for each instance; They aren't shared off of instance's prototype. That's 4N function objects, instead of what could have been - 4 (although 4 comes with its own cost of course) :) [...] -- kangax

[Prototype-core] Re: Event#element deprecated?

2009-10-07 Thread kangax
-DOM environments. [...] -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from this group, send email

[Prototype-core] Re: Event#element deprecated?

2009-10-07 Thread kangax
* that we are retrieving here, not just some vague *element*. What do you think? [...] -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group, send email to prototype

[Prototype-core] Re: Event#element deprecated?

2009-10-07 Thread kangax
above. And it's unquestionably much better than Event#element. Agreed. `element()` didn't quite follow convention. -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group

[Prototype-core] Re: Event#element deprecated?

2009-10-05 Thread kangax
to get target element? [...] -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from this group, send

[Prototype-core] Re: Suggestion: DOM storage methods to Prototype

2009-09-30 Thread kangax
a ticket related to clearing (https:// bugzilla.mozilla.org/show_bug.cgi?id=510234). There's also a minor discrepancy with `key` (https://bugzilla.mozilla.org/show_bug.cgi? id=509241), and few others that you can find on a bugtracker. Please, file a bug. [...] -- kangax

[Prototype-core] Re: Suggestion: DOM storage methods to Prototype

2009-09-29 Thread kangax
unit tests; only functional ones on the front page. -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe

[Prototype-core] Re: Suggestion: DOM storage methods to Prototype

2009-09-29 Thread kangax
for the caching. Nope. I mean clean-side database storage - http://webkit.org/blog/126/ webkit-does-html5-client-side-database-storage/ [...] -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core

[Prototype-core] Re: Suggestion: DOM storage methods to Prototype

2009-09-29 Thread kangax
). Both - Safari 3 and Chrome - have database storage, though. -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group, send email to prototype-core@googlegroups.com

[Prototype-core] Re: Function.EMPTY and Function.K

2009-09-28 Thread kangax
On Sep 28, 3:44 am, Jim Higson j...@wikizzle.org wrote: On Saturday 26 September 2009 04:04:22 kangax wrote: On Sep 24, 11:20 pm, Andrew Dupont goo...@andrewdupont.net wrote: Unless anyone has serious objections, or has a better idea, I'm going to add these as aliases

[Prototype-core] Re: Function.EMPTY and Function.K

2009-09-26 Thread kangax
property - when all that's needed is plain and simple - `return false`. [...] -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group, send email to prototype-core

[Prototype-core] Re: Function.EMPTY and Function.K

2009-09-25 Thread kangax
` (i.e. `function(){ return false; }`). I use it all the time for things like preventing events - `someElement.onselectstart = Prototype.falseFunction;`, etc. Is anyone else using something like that? -- kangax --~--~-~--~~~---~--~~ You received this message because

[Prototype-core] Re: $H({}).get('__proto__') in Firefox =)

2009-09-22 Thread kangax
On Sep 21, 4:40 pm, Yaffle vic99...@yandex.ru wrote: base2.js uses prefix for it's Map Class Yes, but it uses a 1 char string - '#' - so the chance of collisions is still high (imo). [...] -- kangax --~--~-~--~~~---~--~~ You received this message because you

[Prototype-core] Re: Suggestion: selector argument to Element#ancestors

2009-09-22 Thread kangax
/8886/tickets/349-allow- elementnextsiblings-to-take-a-css-rule). I'm not sure why it never got anywhere. [...] -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group, send

[Prototype-core] Re: $H({}).get('__proto__') in Firefox =)

2009-09-14 Thread kangax
expensive. Sorry, I'm not following again :) What's not necessary? Which requests will be more expensive? -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group, send email

[Prototype-core] Re: $H({}).get('__proto__') in Firefox =)

2009-09-13 Thread kangax
coercion usually avoids this problem, albeit in expense of slight performance decrease. Also take a look at this related discussion - http://groups.google.com/group/comp.lang.javascript/msg/f24941a8738be30d -- kangax --~--~-~--~~~---~--~~ You received this message

[Prototype-core] Re: $H({}).get('__proto__') in Firefox =)

2009-09-13 Thread kangax
creation? We can't inject stuff directly onto a hash instance. We still need an object for that. [...] -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group, send email

[Prototype-core] Re: True Hashes using objects as keys

2009-09-12 Thread kangax
a corresponding value). This approach works pretty well most of the time (it only doesn't work on elements that disallow extensions) and I don't see what benefit hashes with non-string keys would bring there. Could you please explain? [...] -- kangax

[Prototype-core] Re: String.toObject and Object.toString

2009-09-11 Thread kangax
is only elegant in theory; in practice it's usually pretty ugly. -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group, send email to prototype-core@googlegroups.com

[Prototype-core] Re: True Hashes using objects as keys

2009-09-11 Thread kangax
is not useful; I'm just failing to see how (and where) it can be applied in practice (especially in a context of web apps). [...] -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group

[Prototype-core] Re: String.toObject and Object.toString

2009-09-11 Thread kangax
and no matter which one you extend, it's still like playing with fire (of course, we already are playing with fire by using `String.evalJSON`, rather than keeping it under a separate namespace). -- kangax --~--~-~--~~~---~--~~ You received this message because you

[Prototype-core] Re: A more efficient $super for Prototype 2

2009-09-09 Thread kangax
there was ever such requirement for mixins in Prototype, though, so there's a chance people are using function-based mixins (for whatever reasons): function Observable(){ ... }; Object.extend(Observable, { observe: function(){ ... }, stopObserving: function(){ ... } }); [...] -- kangax

[Prototype-core] Re: A more efficient $super for Prototype 2

2009-09-08 Thread kangax
the biggest downside to this approach. And, of course, it is impossible to not repeat function name without either relying on function decompilation or completely hog performance by blindly wrapping every single method with a closure to its parent. [...] -- kangax

[Prototype-core] Re: A more efficient $super for Prototype 2

2009-09-04 Thread kangax
On Sep 4, 8:15 am, T.J. Crowder t...@crowdersoftware.com wrote: Hi all, I've come up with a new way of handling $super (which I can't imagine is unique, it's just new to me) which is markedly more efficient than our current $super on all of the browsers I've tried it on. I'm wondering

[Prototype-core] Re: Copying arguments

2009-09-04 Thread kangax
think we all agreed on it in a ticket discussion, after all the revisions). Why not commit it now? [1] https://prototype.lighthouseapp.com/projects/8886/tickets/599-patchtest-performance-improvements-to-functionjs-unwrap-support [...] -- kangax

[Prototype-core] Re: Element#siblings

2009-09-03 Thread kangax
protoSiblings: 78ms; adHocSiblings: 61ms; siblings2: 45ms === Safari 3.2.1 protoSiblings: 28ms; adHocSiblings: 17ms; siblings2: 14ms -- kangax On Sep 3, 5:33 am, Иван Жеков jon...@gmail.com wrote: Actually I did make a test case --http://groups.google.com/group/prototype-core/web/element

[Prototype-core] Re: Array#intersect and Array#without inconsistency

2009-09-03 Thread kangax
to each other might be confusing in context of `uniq`. It might be worth mentioning in the docs that `[NaN, NaN].uniq ()` results in the very same `[NaN, NaN]`. -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[Prototype-core] Re: Prototype 1.6 security exception in firefox 2.0.0.20 in XPath code

2009-06-13 Thread kangax
? I can not reproduce this with trunk version of prototype and FF2.0.0.20 on MacOSX. -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group, send email to prototype-core

[Prototype-core] Re: Multi-event observer

2009-05-28 Thread kangax
find this addition handy or is not worth it? -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from

[Prototype-core] Re: writeAttribute 'style' in IE 7

2009-04-30 Thread kangax
, inline or linked stylesheets). [...] -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from this group

[Prototype-core] Re: Form.serialize additional functionality ...

2009-04-16 Thread kangax
. You can get an inner form by either id (if you know it) or usng `down`/`select` (from the outer form) as needed. -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group

[Prototype-core] Re: Updating Supported Browsers List

2009-03-21 Thread kangax
`String.prototype.escapeHTML` (which is effectively ignored) Thank god, Chromium nightly (2.x) seems to fix this. -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group, send email

[Prototype-core] Re: Updating Supported Browsers List

2009-03-21 Thread kangax
kangax wrote: On Mar 21, 7:08 am, T.J. Crowder t...@crowdersoftware.com wrote: [...] Once we have a solid list, I'll update the page; and then update it again if the list changes in 1.6.0.4, as I expect it will (e.g., +IE8 at least, perhaps Chrome?). I think we pass most of the tests

[Prototype-core] Re: Cloned repo via git, not seeing the unit test html files

2009-03-20 Thread kangax
lately on Chrome, IE7, or Opera on Windows?   I'm on mac. Trunk fully passes FF3 and Safari 4 here. There are a couple of failures in Opera 9.64. I'm taking care of IE8 at the moment - just pushed few fixes for DOM suite. [...] -- kangax --~--~-~--~~~---~--~~ You

[Prototype-core] Re: Prototype and the global namespace

2009-03-03 Thread kangax
of extensibility and collaboration). -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from this group

[Prototype-core] Re: Prototype and the global namespace

2009-03-03 Thread kangax
On Mar 3, 12:53 pm, Mislav Marohnić mislav.maroh...@gmail.com wrote: On Tue, Mar 3, 2009 at 18:43, kangax kan...@gmail.com wrote: It's not clear what will be left of Prototype if it was to change its core way of doing things - Exactly. What's the big deal? Can anybody explain

[Prototype-core] Re: Can prototype.js cache an elements?

2009-02-20 Thread kangax
. Element.method(@element) notation, for example, is much faster than @element.method one, since method is actually a wrapped Element.method function - and so carries a burden of extra abstraction layer. Try to use the former one when performance is at stake. -- kangax

[Prototype-core] Re: Form.Element.present() also for select boxes

2009-02-18 Thread kangax
should reflect this, too. What about a: hasValue method ? `hasValue` as a replacement to `present` or as a wrapper around `getValue().empty()`? In general, I'm not excited about adding another method until we introduce wrappers. -- kangax --~--~-~--~~~---~--~~ You

[Prototype-core] Re: _each method and context

2009-02-16 Thread kangax
= this.length; i length; i++) iterator(this[i]); } while, to be consistent with `forEach`, it would need to look like: function each(iterator, context) { for (var i = 0, length = this.length; i length; i++) iterator.call(context, this[i], i, this); } -- kangax

[Prototype-core] Re: Function.prototype.bind optimization

2009-02-16 Thread kangax
used with one argument very frequently Similar optimization was already done few months ago http://prototype.lighthouseapp.com/projects/8886/tickets/215-optimize-bind-bindaseventlistener -- kangax --~--~-~--~~~---~--~~ You received this message because you

[Prototype-core] Re: _each method and context

2009-02-16 Thread kangax
On Feb 16, 6:09 pm, Tobie Langel tobie.lan...@gmail.com wrote: Can you open  a ticket for this? Sure, patch and test attached. http://prototype.lighthouseapp.com/projects/8886-prototype/tickets/554-_each-to-match-native-foreach-behavior -- kangax

[Prototype-core] Re: Form.Element.present() also for select boxes

2009-02-15 Thread kangax
should fix `getValue` foremost. Would you mind filing a ticket? [1] http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-94282980 [2] http://www.w3.org/TR/DOM-Level-2-Core/core.html#DOMString -- kangax --~--~-~--~~~---~--~~ You received this message because you

[Prototype-core] Re: Convention when testing for empty string

2009-02-13 Thread kangax
/tickets/469-vertical-bar-passed-to-stringgsub-as-pattern-causes-infinite-loop -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group, send email to prototype-core

[Prototype-core] Re: There is no Class.extend in the latest release.

2009-01-11 Thread kangax
. I googled it but none complained about it and I must get something wrong with it. Can anyone give me some hints of what's going on for Cless.extend? Exactly which code did you use? Thnaks, -- kangax --~--~-~--~~~---~--~~ You received this message because you

[Prototype-core] Re: modified lib to support currentTarget in IE

2009-01-10 Thread kangax
as myself... Doesn't prototype's `Event.element` return `currentTarget` equivalent in IE? On the other hand, extending host objects often gets one in trouble (especially in IE). Why don't you try a wrapper approach? -- kangax --~--~-~--~~~---~--~~ You received

[Prototype-core] Re: Safe Object.extend?

2009-01-08 Thread kangax
it implicitly. [...] -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from this group, send email to prototype

[Prototype-core] Re: Making Joose compatible with Prototype

2008-11-19 Thread kangax
[...] -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more

[Prototype-core] Re: Style Guide for rewrite branch

2008-11-16 Thread kangax
be surprising not to see `collect` logging my arguments (as it is calling original `each`, rather than the one I modified : )) `_each` being the only method that really has to be late-bound. Best, Samuel Lebeau [...] -- kangax --~--~-~--~~~---~--~~ You received

[Prototype-core] Re: Style Guide for rewrite branch

2008-11-15 Thread kangax
different objects document.write(foo()); })(); /script /body /html -- T.J. Crowder tj / crowder software / com -- kangax [...] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group

[Prototype-core] Re: Making Joose compatible with Prototype

2008-11-15 Thread kangax
. Could somebody give us a hint about what is going wrong? You can run the test individually and see the problem right here:http://joose-js.googlecode.com/svn/trunk/tests/test.html#test=12_stor... Thank You, Malte -- kangax --~--~-~--~~~---~--~~ You received

[Prototype-core] Re: Style Guide for rewrite branch

2008-11-15 Thread kangax
On Nov 15, 9:58 am, Tobie Langel [EMAIL PROTECTED] wrote: sorry, Kangax for the delay in getting back to you. My computer turned off before I could click send last night. Of course, we can return named function. What I'd want to avoid, however, (for measurable[1] performance hit _every

[Prototype-core] Re: Style Guide for rewrite branch

2008-11-15 Thread kangax
in the future : ) If anything, providing those booleans gives users a great set of low- level tools to adopt and tailor their applications to a particular environment. Am I missing something? -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed

[Prototype-core] Re: Style Guide for rewrite branch

2008-11-13 Thread kangax
and I'm just being overly paranoid : ) I definitely like how clean and maintainable such pattern looks, though. [snip PDoc section] (3) Simple capability/quirk checks, as in the String#escapeHTML example, can go directly into the conditional. More complex checks, like the kind kangax has been

[Prototype-core] Re: Prototype.js mistakes

2008-11-09 Thread kangax
/scr + ipt } ...to avoid the HTML parser ending the script early. Ah, silly me. That explains why I couldn't figure out how to work around it : ) -- T.J. Crowder tj / crowder software / com [...] -- kangax --~--~-~--~~~---~--~~ You received this message

[Prototype-core] Re: Prototype.js mistakes

2008-11-08 Thread kangax
given a cut-off function expression : ) [1]http://www.prototypejs.org/contribute [2]http://www.ecma-international.org/publications/standards/Ecma-262.htm -- T.J. Crowder tj / crowder software / com [...] -- kangax --~--~-~--~~~---~--~~ You received this message

[Prototype-core] Re: Core Plans for Event Delegation?

2008-11-06 Thread kangax
in 1.6.1. Do you know who is planning to take on the development on this feature? Not really. I think some of the core folks have their own implementations. I have been working on one too, some time ago (http:// github.com/kangax/protolicious/tree/master/event.register.js) Which addons were you

[Prototype-core] Re: Core Plans for Event Delegation?

2008-11-04 Thread kangax
) But most important, it handles all the tricky cases around submit and change. It's not that big at 277 lines (with some comments) Let me know if you find it helpful. Interesting. Did you guys find those ua sniffs necessary? [...] -- kangax

[Prototype-core] Re: Core Plans for Event Delegation?

2008-11-03 Thread kangax
new features : ) Perhaps 1.6.1 is a good candidate for it (though such estimates are obviously not official by any means). Which addons were you using? Thanks, Dan -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed

[Prototype-core] Re: Memory Leak on IE

2008-10-31 Thread kangax
to keep track of it. Thanks. [1] http://prototype.lighthouseapp.com/projects/ -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group, send email to prototype-core

[Prototype-core] Re: Memory Leak on IE

2008-10-30 Thread kangax
document and leave observers hanging in memory. [snip] -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe

[Prototype-core] Re: Deprecated API documentation

2008-10-26 Thread kangax
better. -- Christophe Porteneuve aka TDD [EMAIL PROTECTED] -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group, send email to prototype-core@googlegroups.com

[Prototype-core] Re: Roadmap

2008-10-23 Thread kangax
working on replacing UA sniffing with proper feature tests (where possible). We also have bugfixes that didn't make its way into 1.6.0.3 (for various reasons). Some of those will need to be reviewed, tested and applied to 1.6.0.4. Thanks, -- T.J. Crowder tj / crowder software / com -- kangax

[Prototype-core] Re: Prototype Selector Engine

2008-10-22 Thread kangax
of these ideas. [1] http://github.com/dperini/nwevents/tree/master [2] http://github.com/samleb/bouncer/tree/master -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post

[Prototype-core] Re: Class.curry

2008-10-14 Thread kangax
).splice(1)))      }    })   } }) A copy of a class with a curried constructor. Nice. [snip code] -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group, send email

[Prototype-core] Re: element.up() Issue

2008-10-10 Thread kangax
. EMoreth -- kangax On Oct 9, 9:01 pm, EMoreth [EMAIL PROTECTED] wrote: I couldnt reproduce the error out of my project... But looking to the watch of VS2008 i get... +               document        {object}        DispHTMLDocument                 target.tagName  INPUT       String

[Prototype-core] Re: Bug : Object.isNumber() and Hash.toQueryString()

2008-10-09 Thread kangax
` (as a function, not as a constructor) to type convert string into a number? In the cache, there are other custom objects that inherits from Number. I still don't see why not just use primitives (letting interpreter take care of object conversion)? Cordially, Alex -- kangax On 8 oct, 21:15, Tom

[Prototype-core] Re: Bug : Object.isNumber() and Hash.toQueryString()

2008-10-07 Thread kangax
? What's the usecase and why plan type-conversion (before calling isNumber) doesn't satisfy you? Cordially, Alex -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group

[Prototype-core] Re: Bug : Object.isNumber() and Hash.toQueryString()

2008-10-07 Thread kangax
moot type definition in JS, adding `instanceof` check introduces notorious cross-frame issues. Taking care of those issues results in additional complexity (just for the benefit of taking care of edge cases). TAG -- kangax --~--~-~--~~~---~--~~ You received

[Prototype-core] Re: element.descendants in v1.6.0.3

2008-10-06 Thread kangax
-with-native-select-method -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from this group, send email

[Prototype-core] Re: How to tell if element event is observed

2008-10-04 Thread kangax
({ isObserved: function(element){ return ('_prototypeEventID' in $(element)); } }); observed? Also, what is the penalty for not issuing a stop observe? Usually, increased memory usage (and probably some run time processing overhead) -- kangax

[Prototype-core] Re: element.up() Issue

2008-10-03 Thread kangax
file a bug with an attached example that fails. Thanks. EMoreth -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group, send email to prototype-core@googlegroups.com

[Prototype-core] Re: element.up() Issue

2008-10-01 Thread kangax
be any limitations. Could you show the document structure where this happens? Also, browser, prototype version, etc. info would be helpful. Thank you. Thanks in advance... EMoreth -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed

[Prototype-core] Re: new swap method for elements

2008-09-23 Thread kangax
in (aren't there glitches with `insertBefore`, table elements and IE?) -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group, send email to prototype-core@googlegroups.com

[Prototype-core] Re: 1.6.0.3 status: Where we're at

2008-09-06 Thread kangax
http://prototype.lighthouseapp.com/projects/ -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from

[Prototype-core] Re: 1.6.0.3 status: Where we're at

2008-09-05 Thread kangax
to be cross- browser and right now I have to write code separately for IE to deal with this ... Could you please file a bug report. We'll definitely look into it. Best, -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[Prototype-core] Re: 1.6.0.3 status: Where we're at

2008-09-05 Thread kangax
in an error. It's also a good idea to file bug reports when you encounter such issues. It's not easy to test for all the edge-case scenarios. -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core

[Prototype-core] Re: isNumber or Not A Number ??

2008-09-04 Thread kangax
into a number (as you seem to want to do), you might try something like: function canConvertToNumber(n) { return !isNaN(+n); }; -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post

[Prototype-core] Re: isNumber or Not A Number ??

2008-09-02 Thread kangax
On Sep 2, 9:25 pm, EMoreth [EMAIL PROTECTED] wrote: Could someone tell me why Object.isNumber(NaN) returns TRUE ?? Shouldnt this be false ?? This is a somewhat controversial issue. The trunk version actually returns false (by making sure `isFinite` returns a truthy value). -- kangax

[Prototype-core] Re: Element wrapper draft notes

2008-08-22 Thread kangax
/core.html#td-... Of course, but our selector implementation turns them into an array. -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group, send email to prototype

[Prototype-core] Re: Element wrapper draft notes

2008-08-22 Thread kangax
was thinking live.  I've readhttp://github.com/kangax/prototype/tree/master/src/element.js now and see where you're coming from.  Should have done that earlier. So if I'm using Prototype without enabling automatic extension, I can use $$() to get an array of unextended elements and do whatever I want

[Prototype-core] Re: Element wrapper draft notes

2008-08-22 Thread kangax
thousands of times) and all these conditionals. Anyway, let's wait till we have some benchmarks to support these claims : ) -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post

[Prototype-core] Re: Element wrapper draft notes

2008-08-22 Thread kangax
avoiding the extra function call, but anyone who wants to accuse me of premature optimization at the cost of maintainability might be on reasonably solid ground. ;-) But I agree with you:  We need benchmarks. -- kangax --~--~-~--~~~---~--~~ You received

[Prototype-core] Re: Element wrapper draft notes

2008-08-21 Thread kangax
I'm accessing the raw list, it contains wrapped nodes.  Is that the idea? Yep, `source` of NodeList is an array of `Node`s. -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post

[Prototype-core] Re: Element wrapper draft notes

2008-08-21 Thread kangax
?  Or NodeWrappers? NodeWrappers. -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from this group

[Prototype-core] Re: Element wrapper draft notes

2008-08-21 Thread kangax
the only array-like method they have is `slice`. -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from

[Prototype-core] Re: Element wrapper draft notes

2008-08-20 Thread kangax
On Aug 20, 10:13 am, John-David Dalton [EMAIL PROTECTED] wrote: Kangax looks good. I think that it should be $() instead of $W(), but for the purpose of clarity during the discussion the use of $W is fine. I think that any method that returned element, will instead return NodeWrapper. Any

[Prototype-core] Re: Element wrapper draft notes

2008-08-20 Thread kangax
On Aug 21, 12:15 am, Ken Snyder [EMAIL PROTECTED] wrote: ... I forked prototype, and started working on NodeWrapper/NodeListWrapper -http://github.com/kangax/prototype/tree/master/src/element.js Accompanying tests are there as well (although the test suite is far from being complete

[Prototype-core] Re: Prototype's use of global variables

2008-08-19 Thread kangax
On Aug 19, 12:03 pm, John-David Dalton [EMAIL PROTECTED] wrote: @kangax Whatever the name is I think it should be used in all wrappers. This makes it consistent. If you want to check if a wrapper is of a certain instance. if( wrapper instanceof Prototype.Node ) { //wrapper.raw} else

[Prototype-core] Element wrapper draft notes

2008-08-19 Thread kangax
for a newly created element: new Element('div', { className: 'foo' }); // a wrapper for a newly created div class=foo/div Any comments/objections are welcomed ; ) -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[Prototype-core] Re: Element wrapper draft notes

2008-08-19 Thread kangax
On Aug 20, 12:02 am, Walter Lee Davis [EMAIL PROTECTED] wrote: On Aug 19, 2008, at 11:46 PM, kangax wrote:   $W('foo').wrap('div', { className: 'bar' }); // NodeWrapper around a newly created `div` element with class=bar Sorry to barge in the middle here, but could you clarify what 'foo

[Prototype-core] Re: 1.6.0.3 release?

2008-08-18 Thread kangax
be disappointed. If you have any particular requests/ideas, we will gladly hear them out. Best, -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group, send email to prototype-core

[Prototype-core] Re: Prototype's use of global variables

2008-08-18 Thread kangax
would operate on the entire collection: $('foo').show(); // operates on an element $$('div.foo').show(); // operates on a NodeList -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post

[Prototype-core] Re: 1.6.0.3 release?

2008-08-18 Thread kangax
On Aug 18, 8:33 pm, Johan McCain [EMAIL PROTECTED] wrote: Thanks kangax, I'm using trunk wherever I can, that's working out good so far. Another idea/suggestion for the future is that I believe users would prefer more frequent smaller releases instead of one big release with 100+ commits

[Prototype-core] Re: Undocumented Array.indexOf feature

2008-06-27 Thread kangax
It actually is documented ; ) http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Objects:Array:indexOf -- kangax On Jun 27, 10:22 am, Halil [EMAIL PROTECTED] wrote: This function accepts a second argument, to use as an offset. I have found this useful feature just out of trial

[Prototype-core] Re: Element.writeAttribute and FF

2008-06-23 Thread kangax
#writeAttribute will fail when given bogus attribute/value. That's one of the reasons why passing Element as an iterator doesn't work. // Element receives 0,1, ..., n as a second attribute (and then tries to apply those values via #writeAttribute) $w(' div span h2 ').map(Element); - kangax

  1   2   >