dolittle / Bifrost

This is the stable release of Dolittle till its out of alpha->beta stages
Other
110 stars 32 forks source link

Unique ids for elements sitting in a loaded view! #485

Open pavsaund opened 10 years ago

pavsaund commented 10 years ago

We should be able to assure unique ids for a given feature. We have the luxury and option to be able to parse the html for a given view and make sure each id reference is prefixed with a well defined feature path.

typical would be when we have a form input:

<label for="name">Name: </label><input id="name" ..../>

To ensure uniqueness in the DOM, we would like to have a more specific name, but this shouldn't be needed during development:

<label for="namespace_name">Name: </label><input id="namespace_name" ..../>

Would also have to be able to parse any knockout bindings relying on id i.e.: attr

einari commented 10 years ago

It can't have namespace - you might have the same view multiple times on the page. A unique identifier for the container should be established, this should then be part of the naming!