Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setAttribute #7

Open
ghost opened this issue Jul 28, 2015 · 0 comments
Open

setAttribute #7

ghost opened this issue Jul 28, 2015 · 0 comments

Comments

@ghost
Copy link

ghost commented Jul 28, 2015

Hi,

How can one add attribute (new field)
to existing element

for example (which is also might be a bug -when downloading stanza.io)
the plugin declare

var Affiliation = JXT.define({
name: 'affiliation',
namespace: _xmppConstants.Namespace.PUBSUB_OWNER,
element: 'affiliation',
fields: {
node: Utils.attribute('node'),
type: Utils.attribute('affiliation'),

    }
});

I want to extend it to be

var Affiliation = JXT.define({
name: 'affiliation',
namespace: _xmppConstants.Namespace.PUBSUB_OWNER,
element: 'affiliation',
fields: {
node: Utils.attribute('node'),
type: Utils.attribute('affiliation'),
//added field
jid: Utils.jidAttribute('jid')
}
});

something like:

jxt.withDefinition('affiliation', NS, function (affiliation) {
//what do I do here?
});

thanks,
Lior

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

No branches or pull requests

0 participants