DialogElement.hx 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * Copyright (C)2005-2022 Haxe Foundation
  3. *
  4. * Permission is hereby granted, free of charge, to any person obtaining a
  5. * copy of this software and associated documentation files (the "Software"),
  6. * to deal in the Software without restriction, including without limitation
  7. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  8. * and/or sell copies of the Software, and to permit persons to whom the
  9. * Software is furnished to do so, subject to the following conditions:
  10. *
  11. * The above copyright notice and this permission notice shall be included in
  12. * all copies or substantial portions of the Software.
  13. *
  14. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  19. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  20. * DEALINGS IN THE SOFTWARE.
  21. */
  22. package js.html;
  23. /**
  24. The `HTMLDialogElement` interface provides methods to manipulate `<dialog>` elements.
  25. It inherits properties and methods from the `HTMLElement` interface.
  26. @see <https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement>
  27. **/
  28. @:native("HTMLDialogElement")
  29. extern class DialogElement extends Element {
  30. /**
  31. A `Boolean` reflecting the open HTML attribute, indicating whether the dialog is available for interaction.
  32. **/
  33. var open: Bool;
  34. /**
  35. A `DOMString` that sets or returns the return value for the dialog.
  36. **/
  37. var returnValue: String;
  38. /**
  39. Closes the dialog.
  40. An optional `DOMString` may be passed as an argument, updating the `returnValue` of the the dialog.
  41. **/
  42. function close(?returnValue: String): Void;
  43. /**
  44. Displays the dialog modelessly, i.e. still allowing interaction with content outside of the dialog.
  45. **/
  46. function show(): Void;
  47. /**
  48. Displays the dialog as a modal, over the top of any other dialogs that might be present.
  49. Interaction outside the dialog is blocked.
  50. **/
  51. function showModal(): Void;
  52. }