ebidel / geo-location

Web component element for the Geolocation API
https://webcomponents.org/element/ebidel/geo-location
86 stars 25 forks source link

WatchPos GuardClause - Observers running before ready #13

Closed honzalo closed 8 years ago

honzalo commented 8 years ago

WatchPos functionality is not currently working, due to the observer being called before the ready function. fetch() is being called by idle observer and by watchPos observer before being run by the ready() function. During the first run of fetch(), watchPos is still undefined, making the watch_ variable null.

It's my understanding that observers should not run before the element is ready. There is currently an issue open in the polymer project about this subject.

ebidel commented 8 years ago

LGTM