android13/external/chromium-trace/catapult/third_party/polymer/components/iron-location
liiir1985 7f62dcda9f initial 2024-06-22 20:45:49 +08:00
..
.github initial 2024-06-22 20:45:49 +08:00
demo initial 2024-06-22 20:45:49 +08:00
test initial 2024-06-22 20:45:49 +08:00
.bower.json initial 2024-06-22 20:45:49 +08:00
.travis.yml initial 2024-06-22 20:45:49 +08:00
CONTRIBUTING.md initial 2024-06-22 20:45:49 +08:00
README.md initial 2024-06-22 20:45:49 +08:00
bower.json initial 2024-06-22 20:45:49 +08:00
index.html initial 2024-06-22 20:45:49 +08:00
iron-location.html initial 2024-06-22 20:45:49 +08:00
iron-query-params.html initial 2024-06-22 20:45:49 +08:00

README.md

Build status

Demo and API docs

##<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.

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.