Skip to content
This repository has been archived by the owner on Sep 7, 2022. It is now read-only.

<app-pouchdb-sync> 's src property is converted to a URL string #35

Open
LazarValkov opened this issue Jan 18, 2017 · 0 comments
Open

Comments

@LazarValkov
Copy link

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

  1. open /bower_components/app-pouchdb/app-pouchdb-sync.html
  2. Add a log the value of src in the function __computeSync, i.e add: console.log("src= " + src);
  3. 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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant