DebugProfile debugProfile;
protected String const_() {
return "const ";
}
protected void generateListeners(Thing thing, StringBuilder builder, Context ctx) {
<BUG>builder.append("//callbacks for attributes\n");
builder.append("this.propertyListener = {};\n\n");
builder.append("//if (root === null || root === undefined) {//only the root can send message");</BUG>
builder.append("//callbacks for third-party listeners\n");
for (Port p : ThingMLHelpers.allPorts(thing)) {

DebugProfile debugProfile;
protected String const_() {
return "const ";
}
protected void generateListeners(Thing thing, StringBuilder builder, Context ctx) {
builder.append("//callbacks for attributes\n");
if(!((JSCompiler)ctx.getCompiler()).multiThreaded) {
builder.append("this.propertyListener = {};\n\n");
builder.append("//callbacks for third-party listeners\n");
for (Port p : ThingMLHelpers.allPorts(thing)) {
