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

com.vaadin.polymer.iron.element.IronMetaQueryElement Maven / Gradle / Ivy

There is a newer version: 1.9.3.1
Show 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.element;

import com.vaadin.polymer.elemental.*;
import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.client.JsArray;
import com.google.gwt.core.client.js.JsProperty;
import com.google.gwt.core.client.js.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').getAttribute('value').
 * 
 * 
 * 

Pure imperative form would be like:

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

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

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

Retrieves meta data value by key.

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

Actually a factory method, not a true constructor. Only runs if
someone invokes it directly (via new Polymer.IronMeta());

* * JavaScript Info: * @method factoryImpl * @param {} config * */ void factoryImpl(JavaScriptObject config); /** *

Specifies a key to use for retrieving value from the type
namespace.

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

Specifies a key to use for retrieving value from the type
namespace.

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

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); /** *

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); /** *

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); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy