From f41e30ee01231610c425e806794e12caa6855d5f Mon Sep 17 00:00:00 2001 From: Mike Conley Date: Mon, 28 Jan 2019 06:50:25 +0000 Subject: [PATCH] Bug 1441168 - Add some documentation to Window.webidl about DOM modifications within promiseDocumentFlushed callbacks. r=Ehsan Depends on D14101 Differential Revision: https://phabricator.services.mozilla.com/D16472 --HG-- extra : moz-landing-system : lando --- dom/webidl/Window.webidl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dom/webidl/Window.webidl b/dom/webidl/Window.webidl index 76d5171ca22f..45b50a071ce6 100644 --- a/dom/webidl/Window.webidl +++ b/dom/webidl/Window.webidl @@ -466,6 +466,11 @@ partial interface Window { * callback will still be called and the Promise resolved as the window * tears itself down. * + * The callback _must not modify the DOM for any window in any way_. If it + * does, after finishing executing, the Promise returned by + * promiseDocumentFlushed will reject with + * NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR. + * * Note that the callback can be called either synchronously or asynchronously * depending on whether or not flushes are pending: *