cburschka / cadence

A strophe.js-powered XMPP web client for chatrooms.
6 stars 2 forks source link

Support filling arbitrary attributes with generated strings. #444

Closed cburschka closed 7 years ago

cburschka commented 7 years ago

Right now, the string-loader supports setting .text() (via .string[data-string]) and .html() (via .string-html[data-string-html]) and .attr('title') (via .string-title[data-string-title]).

For #94, I want to add a localized placeholder attribute to the search bar.

Instead of adding a new special .string-placeholder class here, it would be better to normalize this as follows:

.string-html is still a special case, but the data attribute is renamed to data-string to keep the attribute namespace compact.

cburschka commented 7 years ago

Actually the string-html thing is only used in one place. If we can get rid of that, it'd help.

(This is because the above patch would make it impossible to add HTML and attributes to the same element.)