Labs/Jetpack/JEP/21: Difference between revisions

Jump to navigation Jump to search
Line 103: Line 103:
=== Initial Implementation API ===
=== Initial Implementation API ===


For the initial implementation, the api will be restricted to  
For the initial implementation, the api will be restricted to:


<pre class="brush:js;">
<pre class="brush:js;">
jetpack.toolbar.navigation
jetpack.toolbar.navigation // get the navBar
var newButton = {id: "fooButton"};
var newButton = {id: "fooButton"}; // create obj literal to configure button
jetpack.toolbar.navigation.append(newButton)
jetpack.toolbar.navigation.append(newButton) // append button
jetpack.toolbar.navigation.remove("fooButton");
jetpack.toolbar.navigation.remove("fooButton"); // remove button


As well as jetpack.toolbar.bookmarks .append / .remove
// As well as jetpack.toolbar.bookmarks .append / .remove


</pre>
</pre>
564

edits

Navigation menu