Skip to content

Instantly share code, notes, and snippets.

@frequent
Last active June 14, 2016 08:07
Show Gist options
  • Save frequent/1d12343b86332d43f4262ab6dda5e415 to your computer and use it in GitHub Desktop.
Save frequent/1d12343b86332d43f4262ab6dda5e415 to your computer and use it in GitHub Desktop.
PyData Hyperconvergence Tutorial: Graph Gadget JS
/*global window, rJS, RSVP, URI */
/*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS, RSVP, URI) {
"use strict";
rJS(window)
// Init local properties
.ready(function (g) {
g.props = {};
})
// Assign the element to a variable
.ready(function (g) {
return g.getElement()
.push(function (element) {
g.props.element = element;
});
})
// Acquired methods
.declareAcquiredMethod("updateHeader", "updateHeader")
// declared methods
.declareMethod("render", function () {
var gadget = this;
return gadget.updateHeader({
page_title: 'PyData'
})
});
}(window, rJS, RSVP, URI));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment