Skip to content
This repository was archived by the owner on Sep 7, 2022. It is now read-only.
This repository was 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

@LazarValkov

Description

@LazarValkov

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions