diff --git a/lib/utils/templatize.html b/lib/utils/templatize.html
index dbd69d4505..d8a2ac296c 100644
--- a/lib/utils/templatize.html
+++ b/lib/utils/templatize.html
@@ -225,6 +225,15 @@
}
return model;
}
+
+ /**
+ * Stub of HTMLElement's `dispatchEvent`, so that effects that may
+ * dispatch events safely no-op.
+ *
+ * @param event {Event} Event to dispatch
+ */
+ dispatchEvent(event) {
+ }
}
/** @type {!DataTemplate} */
diff --git a/test/unit/templatize.html b/test/unit/templatize.html
index b0cc8af595..7a405c4792 100644
--- a/test/unit/templatize.html
+++ b/test/unit/templatize.html
@@ -355,6 +355,17 @@
assert.equal(div.textContent, 'text');
});
+ test('notifies path data changes', function() {
+ const template = document.getElementById('standalone').cloneNode(true);
+ const Template = Polymer.Templatize.templatize(template);
+ const inst = new Template();
+ const div = inst.root.firstElementChild;
+ inst.setProperties({prop: {foo: true}});
+ assert.equal(div.prop.foo, true);
+ inst.set('prop.foo', false);
+ assert.equal(div.prop.foo, false);
+ });
+
});