This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html Multipage: http://www.whatwg.org/C#making-entire-documents-editable:-the-designmode-idl-attribute Complete: http://www.whatwg.org/c#making-entire-documents-editable:-the-designmode-idl-attribute Comment: Should entering designMode disable scripting for the document? Posted from: 173.48.81.109 by bzbarsky@mit.edu User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:20.0) Gecko/20121217 Firefox/20.0
This testcase: <!DOCTYPE html> <body onclick="alert('hey there')"> Click me: do I alert? <script> document.designMode = "on"; </script> <script> alert('Hey, I still run'); </script> </body> suggests non-WebKit UAs disable scripting in designmode: neither the second <script> nor the click handler run in IE9, Gecko, or Presto.
For reference, my thoughts on the matter from some time ago: https://bugzilla.mozilla.org/show_bug.cgi?id=765780#c7 http://lists.w3.org/Archives/Public/public-html/2011Jul/0069.html If you decide to go like non-WebKit browsers and disable scripting, make sure to specify whether the current script runs to completion or not when designMode is turned on. IE doesn't, last I checked (IE9) -- if you do <script> document.designMode = "on"; alert('First alert'); </script> <script> alert('Second alert'); </script> then WebKit alerts both, Gecko/Opera only alert the first, and IE alerts neither.
Since there's no complete interop here, I'm very very sorely tempted to leave it as is (so in this case, matching WebKit, allowing script). It has the additional benefit of being the simplest of the options. But I'm certainly eager to entertain the alternatives, especially since not running script is more common, even if it is done differently in different browsers. Is anyone aware of compat needs one way or the other?
Note that I'm contemplating changing the Gecko behavior to match WebKit here.
FWIW, IE is also contemplating moving to not disabling scripting in designMode (more closely matches contenteditable).
Alright. I'm marking this WORKSFORME for now then. Please reopen if either of you decide otherwise, ideally explaining why in a way that might convince the other browser vendors to agree with you. :-)