From b9ff87ae586535cf65139fb7c5a845aa9395a8e1 Mon Sep 17 00:00:00 2001 From: kimagure44 Date: Thu, 2 Aug 2018 16:42:10 +0200 Subject: [PATCH] attribute native hidden and title in Polymer 2 Solved the failure in polymer 2 with the hidden attribute. When you use the Google Maps component in Polymer 2 the hidden attribute is not working as in Polymer 1, it only works the first time. It seems that with the native attributes of html 'hidden', 'title', etc ... in polymer 2 in this component they do not react to the change.I have reviewed the 'attributeChanged' method and it appears as deprecated and according to the official documentation they recommend using the 'attributeChangedCallback' method, but it behaves the same with the native attributes. I imagine that since they are native attributes they have a behavior that in polymer 1 if it worked but in polymer 2 it does not do in binding. Solution: The first solution was to create a property that would replace the behavior of the hidden or the title, but the final solution is much simpler. You have to declare the native attributes 'hidden' or 'title' as properties of the component, in this way Native attributes work correctly --- google-map-marker.html | 67 ++++++++++++++++++++++++++---------------- 1 file changed, 42 insertions(+), 25 deletions(-) diff --git a/google-map-marker.html b/google-map-marker.html index 1900fa3..8b31d49 100644 --- a/google-map-marker.html +++ b/google-map-marker.html @@ -43,7 +43,7 @@