
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
A dialog webcomponent written in Ecmascript 5. Works with multiple libraries without any dependencies.
This code allows you to add a dialog to your project. The dialog can be added with the cui-dialog html tag. And should have a name attribute in order to target the element to open/close it.
Include the following files to your project (as high as possible):
bower install cui-dialog
npm install cui-dialog
And use a dialog by adding the cui-dialog as followed:
<cui-dialog name="xxx"></cui-dialog>
With cuiDialog API:
cuiDialog.open('xxx');
Or just by calling the open function on the domElement itself:
document.querySelector('cui-dialog[name=xxx]').open();
The cui-dialog has several features which makes it a nice dialog for your projects. It is easy to use, simple to style/theme and is fully build in native Javascript (Ecmascript 5) without depencies. The features are divided in the following categories:
If you want to use a centralized way to interaction with the cui-dialog you can use the global cuiDialog object. This global object has several functions which can be called by providing the name parameter. This means it will target the cui-dialog whith the corresponding name attribute.
cuiDialog(name).open()
Adds an .__isOpen class to the cui-dialog domElement, which will display the dialog as open.
cuiDialog(name).close()
Removes the .__isOpen class from the cui-dialog domElement, which will hide the dialog.
cuiDialog(name).toggle()
Toggles the .__isOpen class on the cui-dialog domElement, which will hide/show the dialog.
cuiDialog(name).toggle(value)
Updates the content of the dialog.
cuiDialog(name).getContent()
Returns the content of the dialog.
If you prefer to use domElements directly instead of the global API you can use the same function as described as above. In the following pseudocode
we assume that domElement is a domElement which you have gather by using something like document.querySelector('cui-dialog').
domElement.open()
Adds an .__isOpen class to the cui-dialog domElement, which will display the dialog as open.
domElement.close()
Removes the .__isOpen class from the cui-dialog domElement, which will hide the dialog.
domElement.toggle()
Toggles the .__isOpen class on the cui-dialog domElement, which will hide/show the dialog.
domElement.updateContent(value)
Updates the content of the dialog.
domElement.getContent()
Returns the content of the dialog.
domElement.state
A string which hold the value of the state the dialog is currently in
domElement.initialized
A boolean which is set to prevent a dialog from being initialized multiple times. This can occur when it takes more time to fully load the
document than it takes for the css animation to trigger the cuiDialogNodeInserted function.
At the moment there is only 1 event and it is triggered on any state change.
document.addEventListener("changeDialogState", function(event) {
console.log(event.detail.dialog);
});
event.detail.dialog This value refers to the domElement of the cui-dialog which state has changed
FAQs
A dialog webcomponent written in Ecmascript 5. Works with multiple libraries without any dependencies.
We found that Cui-Dialog demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.