Skip to content

[popup] Should showPopup() and hidePopup() throw? #511

@mfreed7

Description

@mfreed7

I think this is mostly an ergonomics question. But what should happen here?

<div>Not a popup</div>
<div popup=popup>Valid popup</div>

<script>
const nonPopup = document.querySelector(':not([popup])');
const popup = document.querySelector('[popup]');
nonPopup.showPopup(); // Exception? Console warning? Nothing?
nonPopup.hidePopup(); // Same questions
popup.hidePopup(); // What about here? The popup isn't showing yet.

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    popoverThe Popover API

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions