Some close signals don't target a specific document, such as Android's 'back' action. In a page containing iframes, which document gets the signal?
Option 1: Always the top level.
Option 1a: …unless an element in an iframe is full-screen, in which case it goes to the iframe.
Option 2: Whichever document last had focus.
Option 3: The stack is moved to the traversable. If the close action targets a particular document (such as esc key), then it takes the last item on the stack for this document. Otherwise, it's the last item on the stack.
Option 3 could get complicated due to all the thread hopping.
Some close signals don't target a specific document, such as Android's 'back' action. In a page containing iframes, which document gets the signal?
Option 1: Always the top level. Option 1a: …unless an element in an iframe is full-screen, in which case it goes to the iframe. Option 2: Whichever document last had focus. Option 3: The stack is moved to the traversable. If the close action targets a particular document (such as esc key), then it takes the last item on the stack for this document. Otherwise, it's the last item on the stack.
Option 3 could get complicated due to all the thread hopping.