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

2010-10-22 Thread kangax
anks for catching that. That's lack of unit tests / code review :) [..] -- 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

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

2010-10-21 Thread kangax
On Oct 21, 12:11 pm, Andy E 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

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

2010-10-21 Thread kangax
On Oct 14, 4:45 pm, Andy E wrote: > I recently discovered that several compatibility implementations of > Object.keys() on the web will throw an error for DOM objects in > Internet Explorer 8 and lower.  This differs from the current browsers > having a native implementation and how the ECMAScri

[Prototype-core] Re: Google's Closure Compiler on 1.6.1

2009-11-30 Thread kangax
On Nov 30, 4:25 am, Jim Higson wrote: > > -Original Message- > > From: kangax [mailto:kan...@gmail.com] > > Sent: 29 November 2009 17:59 > > To: Prototype: Core > > Subject: [Prototype-core] Re: Google's Closure Compiler on 1.6.1 > > > On Nov 24

[Prototype-core] Re: Google's Closure Compiler on 1.6.1

2009-11-29 Thread kangax
Aa`, and so on. Without some explicit white/ black -listing of properties that are allowed to be munged, it's not possible to compress library in a safe way. [...] -- kangax -- You received this message because you are subscribed to the Google Groups "Prototype: Core"

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

2009-11-23 Thread kangax
y POST bodies. We still support Safari 2.0.4 (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

[Prototype-core] Re: innerText vs textContent

2009-10-23 Thread kangax
ursive iteration or innerHTML + regex tag stripping (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 m

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

2009-10-16 Thread kangax
On Oct 16, 9:14 am, Ryan Gahl 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 Groups "P

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

2009-10-08 Thread kangax
On Oct 8, 8:24 am, "T.J. Crowder" 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

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

2009-10-07 Thread kangax
nce `findElement` doesn't seem like the best we can come up with). Or am I missing something? > > It made sense to extend it for the reasons I explained above. And it's > unquestionably much better than Event#element. Agreed. `element()` didn't quite follow convention. -- kan

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

2009-10-07 Thread kangax
veys intention better; it actually describes that it is event's *target* 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 Gr

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

2009-10-07 Thread kangax
DOM, making it impossible to use it in non-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@googl

[Prototype-core] Re: Observing objects

2009-10-07 Thread kangax
t at run time by being augmented 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 (al

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

2009-10-05 Thread kangax
rguments 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 unsubscrib

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

2009-09-30 Thread kangax
ket 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.

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

2009-09-30 Thread kangax
ression 'localStorage.getItem' [hello] is not a function." > localStorage['getItem']; // Returns 'world' > localStorage.getItem; // Returns 'world' Good find. File a bug with WebKit, please (https://bugs.webkit.org/ enter_bug.cgi). I'm sure t

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

2009-09-29 Thread kangax
ari 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 To uns

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

2009-09-29 Thread kangax
use browser-side 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 Goog

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

2009-09-29 Thread kangax
for a standalone "module". On a side note, I haven't noticed any unit tests; only functional ones on the front page. -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Prototype: Core"

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

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

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

2009-09-26 Thread kangax
"stopped" 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

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

2009-09-25 Thread kangax
ul `Function.false` (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

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

2009-09-22 Thread kangax
app.com/projects/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&

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

2009-09-22 Thread kangax
On Sep 21, 4:40 pm, Yaffle 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 b

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

2009-09-14 Thread kangax
me requests more 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"

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

2009-09-13 Thread kangax
object 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 po

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

2009-09-13 Thread kangax
ty of an object in Mozilla and will still mess things up. There could also be other non-standard magic properties with unknown behavior. String coercion usually avoids this problem, albeit in expense of slight performance decrease. Also take a look at this related discussion - http://groups.google

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

2009-09-12 Thread kangax
being 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
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

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

2009-09-11 Thread kangax
needed to use hash with arbitrary keys. It doesn't mean such thing 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 b

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

2009-09-11 Thread kangax
egant 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.

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

2009-09-09 Thread kangax
ugh it could be (!)) var Observable = { observe: function(){ ... }, stopObserving: function(){ ... } } I don't think 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

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

2009-09-08 Thread kangax
some.  It makes writing code > harder, and it makes refactoring it harder as well.  Which means more I agree. Repetition of function names is by far the biggest downside to this approach. And, of course, it is impossible to not repeat function name without either rel

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

2009-09-08 Thread kangax
n't go with "name", though, since the > ECMAScript5 spec actually defines "name" for functions.  But > _createdByPrototype would work (and echos the _extendedByPrototype > property on extended Elements)... T.J., could you point me to the exact section specifying `name` on

[Prototype-core] Re: Copying arguments

2009-09-04 Thread kangax
(I 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: A more efficient $super for Prototype 2

2009-09-04 Thread kangax
to authors for sharing common private class methods/data > within the closure, and WOW what a performance difference. Yep, giving function an identifier is quite helpful in debugging/ profiling, or even plain introspection in console. > > There seems to be enough interest in this that it'

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

2009-09-04 Thread kangax
On Sep 4, 8:15 am, "T.J. Crowder" 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 whether we should con

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

2009-09-03 Thread kangax
so it is `include` that would need to be changed. I think I'd rather see `===` used instead of `==` where possible, although there are probably cases when `==` is more convenient. Btw, `NaN` inequality to each other might be confusing in context of `uniq`. It might be worth mentioning in the docs

[Prototype-core] Re: Element#siblings

2009-09-03 Thread kangax
3.5.2 protoSiblings: 41ms; adHocSiblings: 23ms; siblings2: 19ms === Opera 10 protoSiblings: 78ms; adHocSiblings: 61ms; siblings2: 45ms === Safari 3.2.1 protoSiblings: 28ms; adHocSiblings: 17ms; siblings2: 14ms -- kangax On Sep 3, 5:33 am, Иван Жеков wrote: > Actually I did make a test c

[Prototype-core] Re: Element#siblings

2009-09-02 Thread kangax
n more exotic then the original Prototype method, but kinda > has the same spirit as the one above. > > Sooo... Like I noticed in the beginning, that was long, and I am still > not sure it's for this group, and I having in mind I do CSS for a > living, I am asking -- is this &quo

[Prototype-core] Re: Event.stopObserving() doesn't work for window as only argument.

2009-08-12 Thread kangax
; if its a bug. If it is I would happily write a patch for this. The > obvious concern would be browser interoperability, so if there are > reasons that window cannot be extended, I would also like to know what > those are. > > Thanks! > > Allen I can't reproduce this in FF 3.

[Prototype-core] Re: writeAttribute("class") does not work well on IE8 Standard Mode

2009-07-12 Thread kangax
e] = Object.isUndefined(value) ? true : value; > > for (var attr in attributes) { > name = t.names[attr] || attr; > value = attributes[attr]; > if (t.values[attr]) name = t.values[attr](element, value); > if (value === false || value === null) > e

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

2009-06-13 Thread kangax
is exception is thrown I can't use any other > protoype javascript on the page (or any jquery, because the noconflict > fails). > > Is this a bug in firefox or in prototype? I can not reproduce this with trunk version of prototype and FF2.0.0.20 on MacOSX. -- kangax --~--~-~

[Prototype-core] Re: Multi-event observer

2009-05-27 Thread kangax
ndifferent to it, but maybe someone else will like it. We can try using an alternative syntax such as - "foo | bar" or "foo, bar" - to eliminate array object creation, but that might be ambiguous and not back-compat., considering that custom events are currently allowed to include

[Prototype-core] Re: IE8: ActiveX Scripting Security Error on page unload/reload/etc.

2009-05-25 Thread kangax
definitely help to know what exactly causes a dialog (i.e. a minimal test case reproducing this bug). We are aware of a similar issue when IE pops up a dialog as soon as APPLET element is created in IE8 which has no Java installed. The reason for `checkDeficiency` is somewhat explained in this com

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

2009-04-30 Thread kangax
; } Note that this will only work with values set explicitly in a `style` attribute (and not those declared in, say, inline or linked stylesheets). [...] -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Pro

[Prototype-core] Re: New findElements with selector API is faulty

2009-04-23 Thread kangax
, id = $(root).identify(); >           e = "#" + id.replace(/\./, '\\.') + " " + e; >         } > >         results = $A(root.querySelectorAll(e)).map(Element.extend); >         root.id = oldId; > >         return results; >       case

[Prototype-core] Re: alert('test'.stripTags());

2009-04-22 Thread kangax
gsToKeep){ >     if(tagsToKeep) >           tagsToKeep = tagsToKeep.invoke('toLowerCase'); >     return this.replace(tag, function(m){ Will fail in Safari <=2.0.2 [...] -- kangax --~--~-~--~~~---

[Prototype-core] Re: Accessing form fields within container element

2009-04-20 Thread kangax
On Apr 20, 7:42 am, Diego Perini wrote: > kangax, > you showed how to correctly use a context in Prototype selectors and > still perform fast (without repeating the context). > > Another problem, from what I understand, is that this will only work > if the user doesn't

[Prototype-core] Re: Accessing form fields within container element

2009-04-19 Thread kangax
On Apr 19, 5:54 pm, Walter Lee Davis wrote: > $$('#someNode input, #someNode textarea, #someNode select') $('someNode').select('input, textarea, select'); [...] -- kangax --~--~-~--~~~---~--~~ You received this message because

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

2009-04-16 Thread kangax
unsuccessful" for serialization. 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] Re: Updating Supported Browsers List

2009-03-21 Thread kangax
kangax wrote: > On Mar 21, 7:08 am, "T.J. Crowder" 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?). > >

[Prototype-core] Re: Updating Supported Browsers List

2009-03-21 Thread kangax
tead of Prototype's `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 &q

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

2009-03-20 Thread kangax
cessfully run the tests 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 --~--~-~--

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

2009-03-10 Thread kangax
things. It's good to remember that not relying on augmenting *native prototypes* still allows to take advantage of expressive prototypal nature of Javascript. -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Googl

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

2009-03-03 Thread kangax
On Mar 3, 12:53 pm, Mislav Marohnić wrote: > On Tue, Mar 3, 2009 at 18:43, kangax 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 ex

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

2009-03-03 Thread kangax
Bespin not being able to provide ease 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@go

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

2009-02-21 Thread kangax
On Feb 21, 10:55 am, sarapapa wrote: > Hi, kangax. > > > Element extension is very slow in JScript, so `$` is not slow due to > > `getElementById` but is slow due to `Element.extend`. > > Thank you for plain explanation. > I took the wrong understanding of a slow cause

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

2009-02-20 Thread kangax
are also dozens of other things that Prototype does which cause JScript to fall on its knees. Element.(@element) notation, for example, is much faster than @element. one, since is actually a "wrapped" Element. function - and so carries a burden of extra abstraction layer. Try to use the former

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

2009-02-18 Thread kangax
snip] > Maybe the API 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 --~--~-~--~

[Prototype-core] Re: _each method and context

2009-02-16 Thread kangax
On Feb 16, 6:09 pm, Tobie Langel 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 --~--~-~--~~~---~--~~ You recei

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

2009-02-16 Thread kangax
.apply(object, $A(arguments)); >     }; >   } > > P.S.  bind function 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 --~--~-~--~

[Prototype-core] Re: _each method and context

2009-02-16 Thread kangax
iterator) { for (var i = 0, length = 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++)

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

2009-02-15 Thread kangax
surprise!). Unless I'm missing something, we 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 --~--~-~--~~~

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

2009-02-13 Thread kangax
See http://prototype.lighthouseapp.com/projects/8886/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

[Prototype-core] Re: Can the community do anything to help make bugfix releases more frequent?

2009-02-03 Thread kangax
ly stating the problem, making a patch, tests and mentioning which browsers it has been tested on is very helpful (doing any one of these steps is appreciated too, of course :) ) -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to t

[Prototype-core] Re: protosafe download

2009-01-20 Thread kangax
thor - an email. -- 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: There is no Class.extend in the latest release.

2009-01-11 Thread kangax
html file. > 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 --~--~-~--~~~---~--~--

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

2009-01-10 Thread kangax
>           }); >       } > >       return element; >     }, > > I hope some of you will find is as useful 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 (esp

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

2009-01-08 Thread kangax
in the loop) already does 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 unsubscr

[Prototype-core] Re: $super keyword

2009-01-05 Thread kangax
ng argument names) when invoking `toString` on a function object. At least one browser (Opera mini) does that : ) -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Prototype: Core" gr

[Prototype-core] Re: $super keyword

2009-01-05 Thread kangax
On Jan 5, 10:30 am, "Ryan Gahl" wrote: > > _I_ happen not to like it. > > I highly doubt anyone really likes it too much. I personally worry more about relying on non-standard behavior (i.e. function decompilation) [...] -- kangax --~--~-~--~~---

[Prototype-core] Re: $super keyword

2009-01-04 Thread kangax
{ return this.getSuper('say')(message + ', Argh!'); }, say2: function() { return this.getSuper('say2').apply(null, arguments) + ', Argh!' } }); (new Pirate('Joe')).say('Hi'); (new Pirate('Joe')).say2('Hi'

[Prototype-core] Re: $super keyword

2009-01-04 Thread kangax
ll(this, child); // or `super(child)` if `getSuper`returns "instance-bound" reference }, this); Besides, `getSuper` would only clobber "class" with 1 method rather than 2. Am I missing any downsides? > > Best, > > Tobie -- kangax --~--~-~--~~--

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

2008-11-19 Thread kangax
ject Object]]" via `Array.prototype.join` invoked on an array it's contained within (join performs `toString` on each of array's items, if I'm not mistaken). > > Bye > Malte [...] -- kangax --~--~-~--~~~---~--~~ You received this messag

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

2008-11-16 Thread kangax
riginal `each` in `collect` and then I "wrap" `each` to log its arguments, it would be surprising not to see `collect` logging my arguments (as it is calling original `each`, rather than the one I modified : )) > `_each` being the on

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

2008-11-15 Thread kangax
criptors". There's no defined behavior and so nothing to "continue to support" 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? -- kanga

[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

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

2008-11-15 Thread kangax
nt wrong (or at least I can't find any). > > We would really like to get Joose to pass all tests when run with > Prototype. Could somebody give us a hint about what is going wrong? > > You can run the test individually and see the problem right

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

2008-11-15 Thread kangax
nExpression var bar = (function foo(){ return bar === foo; }); // foo simply compares Function object // refered to by `foo` and Function object // refered to by `bar` // in IE it returns `false` - // those ar

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

2008-11-13 Thread kangax
h. [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 working on, will need to be wrapped in > anonymous functions and distilled into boolean

[Prototype-core] Re: Prototype.js mistakes

2008-11-09 Thread kangax
on(){ return "" } > > ...doesn't work in most browsers AFAIK.  (Checked checked FF3, IE6, > Safari3win, Opera9.)  I think one has to be careful to do things like > this: > > function(){ return "" } > &g

[Prototype-core] Re: Prototype.js mistakes

2008-11-08 Thread kangax
"" })();'; s.extractScripts(); // '(function(){ return "' and so `evalScripts` obviously fails when given a cut-off function expression : ) > > [1]http://www.prototypejs.org/contribute > [2]http://www.ecma-international.org/publications/standards/Ecma-26

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

2008-11-06 Thread kangax
iously not official by any means). > > I would love to see this feature 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 (h

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

2008-11-04 Thread kangax
handles basic CSS (tags, ids, classNames) > > 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

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

2008-11-03 Thread kangax
(along with element wrappers). We just need to deal with bugfixes before adding 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 --~--~-~--~~--

[Prototype-core] Re: Memory Leak on IE

2008-10-31 Thread kangax
s [1] and attach both files to it? It would be easier for us 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

[Prototype-core] Re: Memory Leak on IE

2008-10-30 Thread kangax
of `purgeObservers` method and educate people about what happens when you update document and leave observers hanging in memory. [snip] -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Prototype: Core&qu

[Prototype-core] Re: Deprecated API documentation

2008-10-26 Thread kangax
perhaps a tooltip). I think [deprecated] would work better. > > -- > Christophe Porteneuve aka TDD > [EMAIL PROTECTED] -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Prototype:

[Prototype-core] Re: Roadmap

2008-10-23 Thread kangax
ed to 1.6.0.4. > > Thanks, > -- > T.J. Crowder > tj / crowder software / com -- 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: use of getBoundingClientRect in prototype

2008-10-22 Thread kangax
should. We have tons of other stuff to take care of and there's so little time on our hands. Patches/tests are welcome as always : ) > > A related blog posting > here...http://ejohn.org/blog/getboundingclientrect-is-awesome/ > > Thanks, > Andrew -- kangax --~--~--

[Prototype-core] Re: Prototype Selector Engine

2008-10-22 Thread kangax
erforms better. NWMatcher [1] and Bouncer [2] are good examples 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

[Prototype-core] Re: IE Bug

2008-10-22 Thread kangax
extend an element explicitly: $(newDivObj).addClassName('foo'); Please take a look at FAQ http://proto-scripty.wikidot.com/faq#toc27 > regards > Karthik.R -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Googl

[Prototype-core] Re: Class.curry

2008-10-14 Thread kangax
y(this,curriedArguments.concat($A(arguments).splice(1))) >      } >    }) >   } > > }) A "copy" of a "class" with a curried constructor. Nice. [snip code] -- kangax --~--~-~--~~~---~--~~ You received this message because you are

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

2008-10-10 Thread kangax
Glad it worked out for you. > > 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    

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

2008-10-09 Thread kangax
u use `Number` (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, >

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

2008-10-07 Thread kangax
mber but rather of type object. Besides somewhat 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 --~--~--

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

2008-10-07 Thread kangax
r(key, values.toString())); >         } else results.push(toQueryPair(key, values)); >         return results; >       }).join('&'); >     }, > === Alex, I have already replied to you on Lighthouse, but, out of curiosity, why do you need `isNumber` to "work&quo

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

2008-10-06 Thread kangax
/373-elementdescendants-and-elements-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

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

2008-10-04 Thread kangax
rototype: Element.addMethods({ 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 som

  1   2   3   >