Re: [custom elements] Improving the name of document.register()

I found registerElement a good candidate and parallel to
registerProtocolHandler, but after this comments I also think
declareElement is a better alternative. +1 to it.

Send from my Samsung Galaxy Note II
El 13/12/2013 10:18, "Dominic Cooney" <dominicc@google.com> escribió:

> On Fri, Dec 13, 2013 at 5:44 PM, Kenneth Rohde Christiansen <
> kenneth.christiansen@gmail.com> wrote:
>
>> I also really like defineElement. I am not sure that it is easy to
>> understand what it actually means to "register an element", where as
>> defining an element is pretty clear.
>>
>> Kenneth
>>
>> On Fri, Dec 13, 2013 at 9:40 AM, Maciej Stachowiak <mjs@apple.com> wrote:
>> >
>> > Thanks, Google folks, for considering a name to document.register.
>> Though a
>> > small change, I think it will be a nice improvement to code clarity.
>> >
>> > Since we're bikeshedding, let me add a few more notes in favor of
>> > defineElement for consideration:
>> >
>> > ...
>> >
>> > 2) registerElement sounds kind of like it would take an instance of
>> Element
>> > and register it for some purpose. defineElement sounds more like it is
>> > introducing a new kind of element, rather than registering a concrete
>> > instance of an element..
>>
>
> I find all of Maciej's points persuasive, but particularly this one (#2).
>
> Given that Ted, Maciej, Ryosuke and Kenneth all expressed some degree of
> preference for defineElement over registerElement, it should be seriously
> considered.
>
> Brian, Scott, what do you think of "defineElement"? There were some doubts
> expressed about whether "define" reflects the imperative aspects of the
> API, but at least "define" arguably has a more imperative flavor than
> "declare".
>
> I'd also like to hear what other vendors or developers think.
>
> Dominic
>

Received on Friday, 13 December 2013 09:24:31 UTC