diff --git a/source b/source index dedfde927e5..f9a30e35334 100644 --- a/source +++ b/source @@ -78338,7 +78338,6 @@ dictionary DragEventInit : MouseEventInit { boolean confirm(optional DOMString message = ""); DOMString? prompt(optional DOMString message = "", optional DOMString default = ""); void print(); - any showModalDialog(DOMString url, optional any argument); // deprecated unsigned long requestAnimationFrame(FrameRequestCallback callback); void cancelAnimationFrame(unsigned long handle); @@ -79744,9 +79743,8 @@ x === this; // true
This flag prevents content from creating new auxiliary browsing
- contexts, e.g. using the target
attribute, the
- window.open()
method, or the showModalDialog()
method.
target
attribute or
+ the window.open()
method.
window.confirm()
window.print()
window.prompt()
window.showModalDialog()
beforeunload
eventshowModalDialog()
This feature is in the process of being removed from the Web platform. (This
- is a long process that takes many years.) Using the showModalDialog()
API at this time is highly discouraged.
The showModalDialog(url, argument)
method, when invoked,
- must cause the user agent to run the following steps:
Resolve url relative to the - API base URL specified by the entry settings object.
- -If this fails, then throw a SyntaxError
exception and abort these steps.
If the event loop's termination nesting level is non-zero, - optionally abort these steps, returning the empty string.
Release the storage mutex.
- -If the user agent is configured such that this invocation of showModalDialog()
is somehow disabled, then return the empty
- string and abort these steps.
User agents are expected to disable this method in certain cases to avoid user - annoyance (e.g. as part of their popup blocker feature). For instance, a user agent could - require that a site be safelisted before enabling this method, or the user agent could be - configured to only allow one modal dialog at a time.
- -If the active sandboxing flag set of the active document of the - responsible browsing context specified by the incumbent settings - object has either the sandboxed auxiliary navigation browsing context flag - or sandboxed modals flag set, then return the empty string and abort these - steps.
- -Let incumbent origin be the effective script origin
- specified by the incumbent settings object at the time the showModalDialog()
method was called.
Let the list of background browsing contexts be a list of all the - browsing contexts that:
- -Window
object on which the showModalDialog()
method was called, and that...as well as any browsing contexts that are nested inside any of the browsing contexts - matching those conditions.
- -Disable the user interface for all the browsing contexts in the list of - background browsing contexts. This should prevent the user from navigating those browsing - contexts, causing events to be sent to those browsing context, or editing any content in those - browsing contexts. However, it does not prevent those browsing contexts from receiving events - from sources other than the user, from running scripts, from running animations, and so - forth.
- -Create a new auxiliary browsing context, with the opener browsing
- context being the browsing context of the Window
object on which the showModalDialog()
method was called. The new auxiliary
- browsing context has no name.
This browsing context's Document
s' Window
- objects all implement the WindowModal
interface.
Set all the flags in the new browsing context's popup sandboxing flag set that - are set in the active sandboxing flag set of the active document of - the responsible browsing context specified by the incumbent settings - object. The responsible browsing context specified by the incumbent - settings object must be set as the new browsing context's one permitted sandboxed - navigator.
- -Let the dialog arguments of the new browsing context be set to the value of argument, or the undefined value if the argument was omitted.
- -Let the dialog arguments' origin be incumbent origin.
- -Let the return value of the new browsing context be the undefined value.
- -Let the return value origin be incumbent origin.
- -Navigate the new browsing context to - the absolute URL that resulted from resolving - url earlier, with replacement enabled, and with the - responsible browsing context specified by the incumbent settings - object as the source browsing context.
- - - -Spin the event loop until the new browsing context is closed. The user agent must allow the user to indicate - that the browsing context is to be closed.
- -Reenable the user interface for all the browsing contexts in the list of - background browsing contexts.
- -If the auxiliary browsing context's return value origin at the time - the browsing context was closed was the same as incumbent origin, then let return value be the auxiliary browsing context's return - value as it stood when the browsing context was closed.
- -Otherwise, let return value be undefined.
- -Return return value.
- -The Window
objects of Document
s hosted by browsing contexts created by the above algorithm must also implement the
- WindowModal
interface.
When this happens, the members of the WindowModal
interface, in
- JavaScript environments, appear to actually be part of the Window
interface (e.g.
- they are on the same prototype chain as the window.alert()
- method).
[NoInterfaceObject] -interface WindowModal { - readonly attribute any dialogArguments; - attribute any returnValue; -};- -
dialogArguments
Returns the argument argument that was passed to the showModalDialog()
method.
returnValue
[ = value ]Returns the current return value for the window.
- -Can be set, to change the value that will be returned by the showModalDialog()
method.
Such browsing contexts have associated dialog arguments, which are stored along with
- the dialog arguments' origin. These values are set by the showModalDialog()
method in the algorithm above, when the
- browsing context is created, based on the arguments provided to the method.
The dialogArguments
IDL
- attribute, on getting, must check whether its browsing context's active document's
- effective script origin is the same as the dialog arguments'
- origin. If it is, then the browsing context's dialog arguments must be
- returned unchanged. Otherwise, the IDL attribute must return undefined.
These browsing contexts also have an associated return value and return value
- origin. As with the previous two values, these values are set by the showModalDialog()
method in the algorithm above, when the
- browsing context is created.
The returnValue
IDL attribute, on
- getting, must check whether its browsing context's active document's effective
- script origin is the same as the current return
- value origin. If it is, then the browsing context's return value must be
- returned unchanged. Otherwise, the IDL attribute must return undefined. On setting, the
- attribute must set the return value to the given new value, and the return
- value origin to the browsing context's active document's effective
- script origin.
The window.close()
method can be used to
- close the browsing context.
Navigator
object