api-console-ext-comm
Element that support communication with the api-console-extension. It is used in API Console project.
Usage
Installation
npm install --save @api-components/api-console-ext-comm
In a LitElement
import { LitElement, html } from 'lit-element';
import '@api-components/api-console-ext-comm/api-console-ext-comm.js';
class SampleElement extends PolymerElement {
render() {
return html`
<api-console-ext-comm
@hasextension-changed="${this._extensionDetectedHandler}"></api-console-ext-comm>
`;
}
_extensionDetectedHandler(e) {
console.log('The browser has API console extension');
}
}
customElements.define('sample-element', SampleElement);
Development
git clone https://github.com/advanced-rest-client/api-console-ext-comm
cd api-console-ext-comm
npm install
Running the demo locally
npm start
Running the tests
npm test