Labs/Jetpack/Reboot/JEP/113: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 12: Line 12:


<pre class="brush:js">
<pre class="brush:js">
var ctx = l10n.Context()
ctx.addReference('url://foo.l10n')
var params = {
var params = {
   tabs = 1;
   tabs = 1;
}
}


ctx.bindEntity('l10n_id1', params);
// ...
params['tabs'] = 7; // at this poin the entity value updates to a new value
</pre>
* other API bindings examples:
<pre class="brush:js">
var ctx = l10n.Context()
var ctx = l10n.Context()
ctx.addReference('url://foo.l10n')
ctx.addReference('url://foo.l10n')
ctx.bindEntity('l10n_id1', params);


// ...
notification.show({'l10n_id': 'id1'})
params['tabs'] = 7; // at this poin the entity value updates to
contextMenu.add({
  l10n_id: 'id2',
  action: function() {}
})
</pre>
</pre>


Confirmed users
1,016

edits