Skip to content
This repository has been archived by the owner on Dec 31, 2017. It is now read-only.

Add support for documenting attach points and attach events #75

Open
dylans opened this issue Mar 12, 2013 · 2 comments
Open

Add support for documenting attach points and attach events #75

dylans opened this issue Mar 12, 2013 · 2 comments

Comments

@dylans
Copy link

dylans commented Mar 12, 2013

When creating widgets, it's often difficult to track the various items that are specified in the HTML templates. It would be nice to determine a mechanism for documenting the existing of these values in the HTML template, and parsing them in a useful manner for the API viewer.

@wkeese
Copy link
Collaborator

wkeese commented Mar 12, 2013

I've thought about documenting attach points too. One question is what you mean by "attach points". Just data-dojo-attach-point in templates, or any properties that map to widget DOMNodes, regardless of how the widget was created? I would think the latter would be more useful, since for example dojox/mobile widgets often have hand-crafted buildRendering() methods.

I've also thought about adding properties to widget prototypes corresponding to every attach point. We already have that for containerNode and domNode, but not for other properties.

As for attach events, that's stranger to document since it isn't part of the API of the widget, and doesn't correspond to anything we display in the API viewer.

@neonstalwart
Copy link

to doc any property that maps to a node (in a template or not), the simplest solution might be:

declare( ... , {
    /*=====
    // focusNode: DomNode
    //    a summary of the node
    focusNode: null,

    // valueNode: DomNode
    //    something about valueNode
    valueNode: null,
    =====*/

    ...
});

so then the code isn't bloated with property names that don't need to be declared on the prototype but they can still be documented as part of the public API.

i'm probably with @wkeese on attach events

  • i don't see why they matter. they are a way to direct events into the widget and so aren't relevant to what is provided by the widget as part of it's public API
  • i don't know how you'd document them if they did matter

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants