Giter VIP home page Giter VIP logo

iron-location's Introduction

Build status Published on webcomponents.org

Demo and API docs

Changes in 2.0

  • URL Polyfill no longer a dependency. Small workaround implemented.

<iron-location>

The iron-location element manages binding to and from the current URL.

iron-location is the first, and lowest level element in the Polymer team's routing system. This is a beta release of iron-location as we continue work on higher level elements, and as such iron-location may undergo breaking changes.

Properties

When the URL is: /search?query=583#details iron-location's properties will be:

  • path: '/search'
  • query: 'query=583'
  • hash: 'details'

These bindings are bidirectional. Modifying them will in turn modify the URL.

iron-location is only active while it is attached to the document.

Links

While iron-location is active in the document it will intercept clicks on links within your site, updating the URL pushing the updated URL out through the databinding system. iron-location only intercepts clicks with the intent to open in the same window, so middle mouse clicks and ctrl/cmd clicks work fine.

You can customize this behavior with the urlSpaceRegex.

Dwell Time

iron-location protects against accidental history spamming by only adding entries to the user's history if the URL stays unchanged for dwellTime milliseconds.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.