To hide all popovers until, given an HTML element or Document endpoint, a boolean focusPreviousElement, and a boolean fireEvents:
- Let document be endpoint's node document.
- Let closeAllOpenPopovers be an algorithm which performs the following steps:
-
- Let popover be document's topmost auto popover.
-
- While popover is not null:
-
-
- Run the hide popover algorithm given popover, focusPreviousElement, fireEvents, and false.
-
-
- Set popover to document's topmost auto popover.
- If endpoint is null, then run closeAllOpenPopovers and return.
So "endpoint" can be null, so how does steps 1. & 2. get the document? Does that algorithm need to always take a document as extra argument?
cc @josepharhar @mfreed7 @domenic
So "endpoint" can be null, so how does steps 1. & 2. get the document? Does that algorithm need to always take a document as extra argument?
cc @josepharhar @mfreed7 @domenic