🔍

# javascript

How to Implement an Event Bus in JavaScript

The Event Bus is usually used as a communication mechanism between multiple modules, which is equivalent to an event bus. One module sends messages, and other modules receive messages, which achieves the function of communication.

Full-Screen Pop-Up Window Drag and Drop by Vanilla JavaScript

When I was doing business development recently, I encountered a requirement. When the user opened the pop-up window to fill in the content, he wanted to refer to the content in the blank background of the pop-up window, but the pop-up window blocked his sight, so the user wondered whether he could drag the pop-up window arbitrarily.