All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.vaadin.polymer.iron.IronMetaElement Maven / Gradle / Ivy

The newest version!
/*
 * This code was generated with Vaadin Web Component GWT API Generator, 
 * from iron-meta 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;

/**
 * 

iron-meta is a generic element you can use for sharing information across the DOM tree.
It uses monostate pattern such that any
instance of iron-meta has access to the shared
information. You can use iron-meta to share whatever you want (or create an extension
[like x-meta] for enhancements).

*

The iron-meta instances containing your actual data can be loaded in an import,
or constructed in any way you see fit. The only requirement is that you create them
before you try to access them.

*

Examples:

*

If I create an instance like this:

*
<iron-meta key="info" value="foo/bar"></iron-meta>
 * 
 * 
 * 

Note that value=”foo/bar” is the metadata I’ve defined. I could define more
attributes or use child nodes to define additional metadata.

*

Now I can access that element (and it’s metadata) from any iron-meta instance
via the byKey method, e.g.

*
meta.byKey('info');
 * 
 * 
 * 

Pure imperative form would be like:

*
document.createElement('iron-meta').byKey('info');
 * 
 * 
 * 

Or, in a Polymer element, you can include a meta in your template:

*
<iron-meta id="meta"></iron-meta>
 * ...
 * this.$.meta.byKey('info');
 * 
 * 
 * 
*/ @JsType(isNative=true) public interface IronMetaElement extends HTMLElement { @JsOverlay public static final String TAG = "iron-meta"; @JsOverlay public static final String SRC = "iron-meta/iron-meta.html"; /** *

Array of all meta-data values for the given type.

* * JavaScript Info: * @property list * @type Array * */ @JsProperty JsArray getList(); /** *

Array of all meta-data values for the given type.

* * JavaScript Info: * @property list * @type Array * */ @JsProperty void setList(JsArray value); /** *

If true, value is set to the iron-meta instance itself.

* * JavaScript Info: * @property self * @type Boolean * */ @JsProperty boolean getSelf(); /** *

If true, value is set to the iron-meta instance itself.

* * JavaScript Info: * @property self * @type Boolean * */ @JsProperty void setSelf(boolean value); /** *

The meta-data to store or retrieve.

* * JavaScript Info: * @property value * @type Object * */ @JsProperty JavaScriptObject getValue(); /** *

The meta-data to store or retrieve.

* * JavaScript Info: * @property value * @type Object * */ @JsProperty void setValue(JavaScriptObject value); /** *

The key used to store value under the type namespace.

* * JavaScript Info: * @property key * @type String * */ @JsProperty String getKey(); /** *

The key used to store value under the type namespace.

* * JavaScript Info: * @property key * @type String * */ @JsProperty void setKey(String value); /** *

The type of meta-data. All meta-data of the same type is stored
together.

* * JavaScript Info: * @property type * @type String * */ @JsProperty String getType(); /** *

The type of meta-data. All meta-data of the same type is stored
together.

* * JavaScript Info: * @property type * @type String * */ @JsProperty void setType(String value); /** *

Only runs if someone invokes the factory/constructor directly
e.g. new Polymer.IronMeta()

* * JavaScript Info: * @method factoryImpl * @param {{type: (string|undefined), key: (string|undefined), value}=} config * * */ void factoryImpl(Object config); /** *

Retrieves meta data value by key.

* * JavaScript Info: * @method byKey * @param {string} key * * @return {JavaScriptObject} */ JavaScriptObject byKey(String key); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy