Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@polymer/iron-location

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@polymer/iron-location

Bidirectional data binding into the page's URL.

  • 3.0.0-pre.10
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9.2K
decreased by-17.81%
Maintainers
1
Weekly downloads
 
Created
Source

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.

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.

Keywords

FAQs

Package last updated on 22 Feb 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc