riversun / JSFrame.js

An independent lightweight multi-window library for javascript.
MIT License
164 stars 31 forks source link

Allows for 'closeButton' click events to be set when using a frame component on preset appearance 'yosemite' #41

Closed riversun closed 4 years ago

riversun commented 4 years ago

set "closeButtonName" in the appearance param like as follows to change the default close button name 'closeButton' to your original name and Changing the name prevents it from being automatically closed. And you can achieve the close by handling the event with the name you specified.

{
closeButtonName:'my-original-close-button'
}
  frame.on('my-original-close-button', 'click', (_frame, e) => {
    _frame.closeFrame();
  });