- From: Domenic Denicola <d@domenic.me>
- Date: Wed, 28 Jan 2015 05:32:27 +0000
- To: Elliott Sprehn <esprehn@google.com>
- CC: Yehuda Katz <wycats@gmail.com>, Dimitri Glazkov <dglazkov@google.com>, Erik Arvidsson <arv@google.com>, Dmitry Lomov <dslomov@chromium.org>, "WebApps WG" <public-webapps@w3.org>
From: Elliott Sprehn [mailto:esprehn@google.com] > Perhaps, but that logically boils down to "never use string properties ever" just in case some library conflicts with a different meaning. We'd have $[jQuery.find](...) and so on for plugins. Nah, it boils down to "don't use string properties for meta-programming hooks." > Or more concretely isn't the new DOM Element#find() method going to conflict with my <polymer-database>'s find() method? So why not make that [Element.find] so polymer never conflicts? You can overwrite methods on your prototype with no problem. The issue comes when the browser makes assumptions about what user-supplied methods (i.e., metaprogramming hooks) are supposed to behave like. More concretely, if there was browser code that *called* arbitraryElement.find(), then we'd be in a lot more trouble. But as-is we're not. (BTW find() was renamed to query(), IIRC because of conflicts with HTMLSelectElement or something?)
Received on Wednesday, 28 January 2015 05:32:56 UTC