Skip to content

setAttribute #7

@ghost

Description

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions