Last active
September 13, 2023 13:59
-
-
Save jgphilpott/5cbf969038e2bc46c3e2fc2e99ce18ca to your computer and use it in GitHub Desktop.
A helpful interface for the window popup functions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Credit: https://www.w3schools.com/js/js_popup.asp | |
class Popup | |
constructor: -> | |
null | |
alert: (text = "") -> | |
return window.alert text | |
confirm: (text = "") -> | |
return window.confirm text | |
prompt: (text = "", placeholder = "") -> | |
return window.prompt text, placeholder |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Credit: https://www.w3schools.com/js/js_popup.asp | |
var Popup; | |
Popup = class Popup { | |
constructor() { | |
null; | |
} | |
alert(text = "") { | |
return window.alert(text); | |
} | |
confirm(text = "") { | |
return window.confirm(text); | |
} | |
prompt(text = "", placeholder = "") { | |
return window.prompt(text, placeholder); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment