@advanced-rest-client/cookie-editor

An element to edit cookie details

Usage no npm install needed!

<script type="module">
  import advancedRestClientCookieEditor from 'https://cdn.skypack.dev/@advanced-rest-client/cookie-editor';
</script>

README

Published on NPM

Build Status

Published on webcomponents.org

An element to edit cookie details.

The cookie data model is consistent with Electron's cookie object.

Usage

Installation

npm install --save @advanced-rest-client/cookie-editor

In an html file

<html>
  <head>
    <script type="module">
      import './node_modules/@advanced-rest-client/cookie-editor/cookie-editor.js';
    </script>
  </head>
  <body>
    <cookie-editor></cookie-editor>
  </body>
</html>

In a LitElement

import { LitElement, html } from 'lit-element';
import '@advanced-rest-client/cookie-editor/cookie-editor.js';

class SampleElement extends PolymerElement {
  render() {
    return html`
    <cookie-editor
      .cookie="${this.cookie}"
      @save="${this._cookieSaveHandler}"
      @cancel="${this._cookieCancelHandler}"></cookie-editor>
    `;
  }

  _cookieSaveHandler(e) {
    ...
  }

  _cookieCancelHandler(e) {
    ...
  }
}
customElements.define('sample-element', SampleElement);

Development

git clone https://github.com/advanced-rest-client/cookie-editor
cd cookie-editor
npm install

Running the demo locally

npm start

Running the tests

npm test

API components

This components is a part of API components ecosystem