com.vaadin.polymer.iron.IronLocationElement Maven / Gradle / Ivy
/*
* This code was generated with Vaadin Web Component GWT API Generator,
* from iron-location project by The Polymer Authors
* that is licensed with http://polymer.github.io/LICENSE.txt license.
*/
package com.vaadin.polymer.iron;
import com.vaadin.polymer.elemental.*;
import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.client.JsArray;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsProperty;
import jsinterop.annotations.JsType;
/**
* 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.
*/
@JsType(isNative=true)
public interface IronLocationElement extends HTMLElement {
@JsOverlay public static final String TAG = "iron-location";
@JsOverlay public static final String SRC = "iron-location/iron-location.html";
/**
* If the user was on a URL for less than dwellTime
milliseconds, it
won’t be added to the browser’s history, but instead will be replaced
by the next entry.
* This is to prevent large numbers of entries from clogging up the user’s
browser history. Disable by setting to a negative number.
*
* JavaScript Info:
* @property dwellTime
* @type Number
*
*/
@JsProperty double getDwellTime();
/**
* If the user was on a URL for less than dwellTime
milliseconds, it
won’t be added to the browser’s history, but instead will be replaced
by the next entry.
* This is to prevent large numbers of entries from clogging up the user’s
browser history. Disable by setting to a negative number.
*
* JavaScript Info:
* @property dwellTime
* @type Number
*
*/
@JsProperty void setDwellTime(double value);
/**
* A regexp that defines the set of URLs that should be considered part
of this web app.
* Clicking on a link that matches this regex won’t result in a full page
navigation, but will instead just update the URL state in place.
* This regexp is given everything after the origin in an absolute
URL. So to match just URLs that start with /search/ do:
url-space-regex=”^/search/“
*
* JavaScript Info:
* @property urlSpaceRegex
* @type (string|RegExp)
*
*/
@JsProperty Object getUrlSpaceRegex();
/**
* A regexp that defines the set of URLs that should be considered part
of this web app.
* Clicking on a link that matches this regex won’t result in a full page
navigation, but will instead just update the URL state in place.
* This regexp is given everything after the origin in an absolute
URL. So to match just URLs that start with /search/ do:
url-space-regex=”^/search/“
*
* JavaScript Info:
* @property urlSpaceRegex
* @type (string|RegExp)
*
*/
@JsProperty void setUrlSpaceRegex(Object value);
/**
* The hash component of the URL.
*
* JavaScript Info:
* @property hash
* @type String
*
*/
@JsProperty String getHash();
/**
* The hash component of the URL.
*
* JavaScript Info:
* @property hash
* @type String
*
*/
@JsProperty void setHash(String value);
/**
* The pathname component of the URL.
*
* JavaScript Info:
* @property path
* @type String
*
*/
@JsProperty String getPath();
/**
* The pathname component of the URL.
*
* JavaScript Info:
* @property path
* @type String
*
*/
@JsProperty void setPath(String value);
/**
* The query string portion of the URL.
*
* JavaScript Info:
* @property query
* @type String
*
*/
@JsProperty String getQuery();
/**
* The query string portion of the URL.
*
* JavaScript Info:
* @property query
* @type String
*
*/
@JsProperty void setQuery(String value);
}