Opened 15 years ago

Closed 15 years ago

#2184 closed enhancement (fixed)

allow class="myns-Widget" syntax for user namespaces

Reported by: [email protected] Owned by: dylan
Priority: high Milestone: 0.9
Component: Parser Version: 0.4.1
Keywords: Parser Widget Namespace class= className dojo- dojoType Cc:
Blocked By: Blocking:


Right now "dojo-" is hard coded in xml/Parse.js/getDojoTagName to only recognize the dojo- prefix in node classNames.

<div class="abc dojo-RichText def" ... // dojo- gets picked up
<div class="abc myns-Widget def" ... // user prefix myns- not recognized

Would be nice if usage were consistent and supported for all registered namespaces.

If automatically checking all ns's during parse time is too expensive, then soft coding the desired class prefixes as part of djConfig would also be fine. Maybe something like:

	djConfig = { 
		cssClassNamespaces: [ "dojo, "myns" ]

Change History (4)

comment:1 Changed 15 years ago by Adam Peller

iirc, this was to accomodate the existing conventions for the dojo namespace before others were included. I think this would only add to the weight of the parsing process, as well as the spec. What's wrong with using a colon?

comment:2 Changed 15 years ago by [email protected]

I'm toying with transparent CMS Widgets. They operate on standard HTML constructs, become live and interactive in a Dojo + Authorized environment, and then flatten back to standard HTML for persistence.

How about a compromise and we make getDojoTagName() a public function on dojo.xml.Parse? Right now it is hidden in a closure, and the only way to extend is to change the source...

comment:3 Changed 15 years ago by dylan

Given Alex's revised widget parsing proposal, we're going to need this, but we may be doing this in a completely different manner, meaning I'm not sure if we want to build this into the existing parser.

comment:4 Changed 15 years ago by bill

Resolution: fixed
Status: newclosed

All of this has changed for dijit; you just specify the full class name when declaring a widget. There are no namespaces anymore.

Note: See TracTickets for help on using tickets.