<!--
-- Copyright 2013 The Chromium Authors. All rights reserved.
-- Use of this source code is governed by a BSD-style license that can be
-- found in the LICENSE file.
-->
<polymer-element name="kb-key-import" attributes="importId">
<template>
<style>
:host {
display: none;
}
</style>
</template>
<script>
Polymer('kb-key-import', {
/**
* The id of the document fragment that will be imported.
*/
importId: null,
/**
* Import content from a document fragment.
* @param {!DocumentFragment} content Document fragment that contains
* the content to import.
*/
importDoc: function(content) {
var id = this.getAttribute('importId');
var fragment = content.querySelector('#' + id);
return fragment && fragment.content ? fragment.content : fragment;
}
});
</script>
</polymer-element>