Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
fixup docs and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
frankiefu committed Apr 9, 2014
1 parent fa2dcbd commit 9047b8b
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 49 deletions.
2 changes: 1 addition & 1 deletion README.md
@@ -1,4 +1,4 @@
core-meta
=========

See //polymer.github.io/core-meta
See the [component page](http://polymer.github.io/core-meta) for more information.
95 changes: 47 additions & 48 deletions core-meta.html
Expand Up @@ -6,55 +6,54 @@
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->

<!--
/**
* @group Polymer Core Elements
*
* `core-meta` provides a method of constructing a self-organizing database.
* It is useful to collate element meta-data for things like catalogs and for
* designer.
*
* Example, an element folder has a `metadata.html` file in it, that contains a
* `core-meta`, something like this:
*
* <core-meta id="my-element" label="My Element">
* <property name="color" value="blue"></property>
* </core-meta>
*
* An application can import as many of these files as it wants, and then use
* `core-meta` again to access the collected data.
*
* <script>
* var meta = document.createElement('core-meta');
* console.log(meta.list); // dump a list of all meta-data elements that have been created
* </script>
*
* Use `byId(id)` to retrive a specific core-meta.
*
* <script>
* var meta = document.createElement('core-meta');
* console.log(meta.byId('my-element'));
* </script>
*
* By default all meta-data are stored in a single databse. If your meta-data
* have different types and want them to be stored separately, use `type` to
* differentiate them.
*
* Example:
*
* <core-meta id="x-foo" type="xElt"></core-meta>
* <core-meta id="x-bar" type="xElt"></core-meta>
* <core-meta id="y-bar" type="yElt"></core-meta>
*
* <script>
* var meta = document.createElement('core-meta');
* meta.type = 'xElt';
* console.log(meta.list);
* </script>
*
* @element core-meta
* @homepage github.io
*/
`core-meta` provides a method of constructing a self-organizing database.
It is useful to collate element meta-data for things like catalogs and for
designer.
Example, an element folder has a `metadata.html` file in it, that contains a
`core-meta`, something like this:
<core-meta id="my-element" label="My Element">
<property name="color" value="blue"></property>
</core-meta>
An application can import as many of these files as it wants, and then use
`core-meta` again to access the collected data.
<script>
var meta = document.createElement('core-meta');
console.log(meta.list); // dump a list of all meta-data elements that have been created
</script>
Use `byId(id)` to retrive a specific core-meta.
<script>
var meta = document.createElement('core-meta');
console.log(meta.byId('my-element'));
</script>
By default all meta-data are stored in a single databse. If your meta-data
have different types and want them to be stored separately, use `type` to
differentiate them.
Example:
<core-meta id="x-foo" type="xElt"></core-meta>
<core-meta id="x-bar" type="xElt"></core-meta>
<core-meta id="y-bar" type="yElt"></core-meta>
<script>
var meta = document.createElement('core-meta');
meta.type = 'xElt';
console.log(meta.list);
</script>
@group Polymer Core Elements
@element core-meta
@homepage github.io
-->

<link rel="import" href="../polymer/polymer.html">
Expand Down

0 comments on commit 9047b8b

Please sign in to comment.