Description
Putting the name of the local database in the src, converts the string into a URL.
<app-pouchdb-sync src="localDbName" target="http://ip:port/remoteDb" bidirectional > tries to create
Pouch.sync('http://localhost:8080/src/localDbName', http://ip:port/remoteDb") which results in the synchronisation not working.
Expected outcome
<app-pouchdb-sync src="localDbName" target="http://ip:port/remoteDb" bidirectional > is expected to launch
Pouch.sync('localDbName', http://ip:port/remoteDb")
Actual outcome
The element converts src into a URL, namely, 'http://localhost:8080/src/localDbName' and thus tries to launch
Pouch.sync('http://localhost:8080/src/localDbName', http://ip:port/remoteDb")
Live Demo
Steps to reproduce
- open /bower_components/app-pouchdb/app-pouchdb-sync.html
- Add a log the value of src in the function __computeSync, i.e add:
console.log("src= " + src);
- Use it from another element:
<app-pouchdb-sync
src="localDbName"
target="thisNameCanAlsoBeLocal"
bidirectional>
</app-pouchdb-sync>
Alternatively, create a new element
<script>
(function() {
Polymer({
is: 'my-element',
properties: {
src: {
type: String
}
},
ready: function() {
console.log(this.src);
}
});
})();
</script>
And use it from another element
The console should display
http://localhost:8080/src/mystring
Browsers Affected
- [-] Chrome
- [ ?] Firefox
- [ ?] Safari 9
- [ ?] Safari 8
- [ ?] Safari 7
- [-] Edge
- [ ? ] IE 11
- [ ? ] IE 10