![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
modal-utility
Advanced tools
This module provides Javascript and Sass to enable creating modal windows. General UI Events are provided by default (see parameters section) in relation to the modals:
npm install modal-utility
You only need to import these two files into your build:
dist/_modal-utility.scss
dist/modal-utility.js
The Javascript is an ES6 module
Once its imported, you'll need to execute a setup function like so:
const modalUtility = ModalUtility(document);
Then you can use a set of functions returned, like so:
config options
const options = {
title: 'This is my title',
dismissable: true
};
create some content
const modalContents = document.createElement('p');
modalContents.textContent = 'Hello, Modal';
create a modal
let modal = modalUtility.createModal(document, options);
set the content into the modal
modalUtility.setContents(modal, modalContents);
show the modal
modalUtility.showModal(document, modal);
hide the modal
modalUtility.hideModal(document);
Setting | Description |
---|---|
title | The text to display in the title area of the modal |
dismissable | True if the modal removal events should be bound, False if not. (default: true) |
additionalClasses | An array of classes to set on the modal |
headingClasses | An array of classes to set on the heading |
Parameter | Purpose |
---|---|
options | An object containing various settings, see below |
Parameter | Purpose |
---|---|
modal | a modal created with ModalUtility, contents will be inserted into its content area |
contents | a DOM Element containing 0 or more other Elements to be inserted |
Parameter | Purpose |
---|---|
modal | a modal created with ModalUtility, appended to the given element |
FAQs
A set of functions that allow creating accessible modals.
The npm package modal-utility receives a total of 0 weekly downloads. As such, modal-utility popularity was classified as not popular.
We found that modal-utility demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.