Socket
Socket
Sign inDemoInstall

@advanced-rest-client/arc-scroll-target-mixin

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@advanced-rest-client/arc-scroll-target-mixin

arc-scroll-target-mixin is a port of iron-scroll-target-behavior that works with LitElement


Version published
Weekly downloads
9
increased by125%
Maintainers
1
Weekly downloads
 
Created
Source

Published on NPM

Build Status

Published on webcomponents.org

This mixin is a port of iron-overlay-behavior that works with LitElement.

ArcScrollTargetMixin allows an element to respond to scroll events from a designated scroll target.

Elements that consume this mixin can override the _scrollHandler method to add logic on the scroll event.

Installation

npm i @advanced-rest-client/arc-scroll-target-mixin

Usage

import { LitElement } from 'lit-element';
import { ArcScrollTargetMixin } from '@advanced-rest-client/arc-scroll-target-mixin/arc-scroll-target-mixin.js';

class ArcScrollTargetImpl extends ArcScrollTargetMixin(LitElement) {
  static get properties() {
    const top = super.properties || {};
    const props = {
      myProp: { type: String }
    }
    return Object.assign({}, top, props);
  }

  _scrollHandler(e) {
    ...
  }
}

Note, You need to include properties from the mixin manually as simple class extension overrides properties.

Testing

npm run test

Testing with Sauce Labs

npm run test:sl

Demo

npm start

Keywords

FAQs

Package last updated on 20 Jul 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc