From 15ff463a4b0a06507fbefd86aada9e05cc705aba Mon Sep 17 00:00:00 2001 From: herr kaste Date: Sat, 19 Mar 2016 00:49:50 +0100 Subject: [PATCH] Ensure Annotator recognizes dynamic fn as dependency for parent props. --- src/standard/annotations.html | 3 +++ test/unit/bind-elements.html | 28 ++++++++++++++++++++++++++++ test/unit/bind.html | 12 ++++++++++++ 3 files changed, 43 insertions(+) diff --git a/src/standard/annotations.html b/src/standard/annotations.html index 3743c48af0..897eb18be1 100644 --- a/src/standard/annotations.html +++ b/src/standard/annotations.html @@ -195,6 +195,9 @@ pp[model] = true; } } + if (p.signature.dynamicFn) { + pp[p.signature.method] = true; + } } else { if (p.model) { pp[p.model] = true; diff --git a/test/unit/bind-elements.html b/test/unit/bind-elements.html index f5327e3a85..73efb8e91e 100644 --- a/test/unit/bind-elements.html +++ b/test/unit/bind-elements.html @@ -685,3 +685,31 @@ }); + + + + + diff --git a/test/unit/bind.html b/test/unit/bind.html index b56ed2da0f..bfc9bc8a96 100644 --- a/test/unit/bind.html +++ b/test/unit/bind.html @@ -388,6 +388,18 @@ }); + test('ensure annotator can pass dynamic fn to parent props', function(done) { + el = document.createElement('x-child-template-with-dynamic-fn'); + document.body.appendChild(el); + + setTimeout(function() { + var check = Polymer.dom(el.root).querySelector('p'); + assert.equal(check.textContent, 'text'); + done(); + }); + + }); + });