Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot define property "title" for element "leaflet-marker" because it has the same name as an HTMLElement property, and not all browsers support overriding that. #18

Open
michaeloboyle opened this issue Jan 28, 2015 · 0 comments

Comments

@michaeloboyle
Copy link

I get this error when loading leaflet-map.html into my rails project with polymer.

Cannot define property "title" for element "leaflet-marker" because it has the same name as an HTMLElement property, and not all browsers support overriding that. Consider giving it a different name.

Seems like the sort of collision web components is designed to avoid but perhaps browser properties penetrate the shadow dom defenses?

    // polymer.js excerpt

    // Publishing/computing a property where the name might conflict with a
    // browser property is not currently supported to help users of Polymer
    // avoid browser bugs:
    //
    // https://code.google.com/p/chromium/issues/detail?id=43394
    // https://bugs.webkit.org/show_bug.cgi?id=49739
    //
    // We can lift this restriction when those bugs are fixed.
    filterInvalidAccessorNames: function(propertyNames) {
      for (var name in propertyNames) {
        // Check if the name is in our blacklist.
        if (this.propertyNameBlacklist[name]) {
          console.warn('Cannot define property "' + name + '" for element "' +
            this.name + '" because it has the same name as an HTMLElement ' +
            'property, and not all browsers support overriding that. ' +
            'Consider giving it a different name.');
          // Remove the invalid accessor from the list.
          delete propertyNames[name];
        }
      }
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant