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

On Fri, Dec 13, 2013 at 2:29 AM, Brian Kardell <bkardell@gmail.com> wrote:

>
> On Dec 11, 2013 11:48 PM, "Ryosuke Niwa" <rniwa@apple.com> wrote:
> >
> >
> > On Dec 11, 2013, at 6:46 PM, Dominic Cooney <dominicc@google.com> wrote:
> >
> ...
> >>> El 11/12/2013 21:10, "Edward O'Connor" <eoconnor@apple.com> escribió:
> >>>
> >>>> Hi,
> >>>>
> >>>> The name "register" is very generic and could mean practically
> anything.
> >>>> We need to adopt a name for document.register() that makes its purpose
> >>>> clear to authors looking to use custom elements or those reading
> someone
> >>>> else's code that makes use of custom elements.
> >>
> >> I think the method should be called registerElement, for these reasons:
> >>
> >> - It's more descriptive about the purpose of the method than just
> "register."
> >> - It's not too verbose; it doesn't have any redundant part.
> >> - It's nicely parallel to registerProtocolHandler.
> >
> >
> > I'd still refer declareElement (or defineElement) since registerElement
> sounds as if we're registering an instance of element with something.
>  Define and declare also match SGML/XML terminologies.
> >
> > - R. Niwa
> >
>
> Define/declare seem a little confusing because we are in the imperative
> space where these have somewhat different connotations.  It really does
> seem to me that conceptually we are registering (connecting the definition)
> with the parser or something.  For whatever that comment is worth.
>
While there's no consensus, I think this thread expresses a slightly
stronger preference for registerElement than other proposals. I have filed
this bug suggesting registerElement.

<https://www.w3.org/Bugs/Public/show_bug.cgi?id=24087>

Dominic

Received on Friday, 13 December 2013 06:10:20 UTC