Socket
Socket
Sign inDemoInstall

@advertol/control-element-classes

Package Overview
Dependencies
1
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @advertol/control-element-classes

Add HTML classes to zone elements based on zone state.


Version published
Weekly downloads
480
decreased by-9.94%
Maintainers
1
Install size
126 kB
Created
Weekly downloads
 

Changelog

Source

[1.0.0][] - 2019-04-01

Added

  • Initial implementation

Readme

Source

@advertol/control-element-classes

Build Status BrowserStack Status

Add HTML classes to zone DOM elements based on zone state.

Install

npm install @advertol/control-element-classes --save

Usage

import advertol from '@advertol/core';
import ElementClassesControl from '@advertol/control-element-classes';

const instance = advertol({
	// …
	control: [
		new ElementClassesControl({
			isHidden: 'is-hidden',
			isLoaded: 'is-loaded',
			isEmpty: 'is-empty'
		})
	]
});

instance.resolve();

API

elementClassesControl(classes)

classes

Type: Object

HTML classes to apply on zone DOM element based on current state.

PropertyTypeDescription
isHiddenstringHTML class when zone is hidden.
isLoadedstringHTML class when zone is loaded.
isEmptystringHTML class when zone is empty.

Browser support

Tested in IE9+ and all modern browsers, assuming Element.prototype.classList is available.

Test

For automated tests, run npm run test:automated (append :watch for watcher support).

License

MIT © Ivan Nikolić

Keywords

FAQs

Last updated on 01 Apr 2019

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc