Make Anchor.prototype.context n-ary

This commit is contained in:
Tony Garnock-Jones 2016-05-11 22:13:35 -04:00
parent e67d018079
commit 879e2425b9
2 changed files with 4 additions and 3 deletions

View File

@ -33,7 +33,7 @@ function spawnChatApp() {
assert toBroker(url, present(this.nym, this.status));
during fromBroker(url, present($who, $status)) {
assert ui.context(who)
assert ui.context(who, status)
.html('#nymlist',
Mustache.render($('#nym_template').html(), { who: who, status: status }));
}

View File

@ -337,8 +337,9 @@ function Anchor(explicitFragmentId) {
this.eventPattern = uiEvent(this.fragmentId, __, __, __);
}
Anchor.prototype.context = function (contextId) {
return new Anchor(this.fragmentId + '_' + escapeDataAttributeName(contextId));
Anchor.prototype.context = function (/* ... */) {
var extn = Array.prototype.slice.call(arguments).map(escapeDataAttributeName).join('__');
return new Anchor(this.fragmentId + '__' + extn);
};
Anchor.prototype.html = function (selector, html) {