Skip to content

showModal of dialog element not supported #598

Description

@mawinter69

When I have a dialog element

<button id="showMyDialog">Show dialog</button>
<dialog id="mydialog">
  Hello World<br/>
  <button id="dismiss">Dismiss</button>
</dialog>

And I want to show this dialog in javascript with

showButton = document.getElementById("showMyDialog");
showButton.addEventListener("click", showMyDialog);

dismissButton = document.getElementById("dismiss");
dismissButton.addEventListener("click", closeMyDialog);


function showMyDialog() {
  mydialog = document.getElementById("mydialog");
  mydialog.showModal();
}

function closeMyDialog() {
  mydialog = document.getElementById("mydialog");
  mydialog.close();
}

I'm not able to test this with htmlunit as showModal is not supported

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions