Merge branch 'master' into gh-pages

# Conflicts:
#	modules/shared/es6/component.js
#	modules/shared/lib/sticky.js
This commit is contained in:
Jeff Parsons 2017-01-25 11:47:07 -08:00 committed by Jeff Parsons
commit 16fd3961de
9 changed files with 72 additions and 34 deletions

View file

@ -106,8 +106,17 @@ class Component {
this.comment = parms['comment'];
this.parms = parms;
this['exports'] = {};
this['bindings'] = {};
/*
* The following Component properties need to be accessible by other machines and/or command scripts;
* well, OK, or we could have exported some new functions to walk the contents of these properties, as we
* did with findMachineComponent(), but this works just as well.
*
* Also, while the double-assignment looks silly (ie, using both dot and bracket property notation), it
* resolves a complaint from the Closure Compiler, because if we use ONLY bracket notation here, then the
* Compiler wants us to change all the other references to bracket notation as well.
*/
this.exports = this['exports'] = {};
this.bindings = this['bindings'] = {};
var i = this.id.indexOf('.');
if (i < 0) {

View file

@ -113,7 +113,7 @@ function commandMachine(idMachine, sComponent, sCommand, sValue)
var component = window.findMachineComponent(idMachine, sComponent);
if (component) {
if (sCommand == "script") {
window.alert("script(" + sValue + ")");
window.alert("commandScript('" + sValue + "')");
} else {
var exports = component['exports'];
if (exports) {