News for hackers. Stuff that matters.
Re:Chrome Has a Document Design Mode by kn0where on Friday April 17, 2020 @01:13PM (#22900896)
Is this different than

  document.querySelector("html").contentEditable = true;

?
Re:Chrome Has a Document Design Mode by catchmeifyoucan on Friday April 17, 2020 @01:15PM (#22900914)
Yes. This is like editable text for any text on the screen enabled.
Re:Chrome Has a Document Design Mode by nulld3v on Friday April 17, 2020 @02:55PM (#22901790)
But that's what contentEditable already does?
Re:Chrome Has a Document Design Mode by catchmeifyoucan on Friday April 17, 2020 @03:48PM (#22902330)
Right. Turning this mode on makes everything contentEditable so you can change up a website.

For example, let's say your making mockups and want to change some text. This lets you do that really quickly.

Re:Chrome Has a Document Design Mode by szhu on Friday April 17, 2020 @06:09PM (#22903426)
Yes, we heard you the first time. The code snippet kn0where posted has the same effect. :)

I looked into this some more, and I think the actual difference between `document.documentElement.contentEditable` and `document.designMode` is subtle and probably mostly just in principle: since contentEditable is set on elements, someone with only access DOM access could potentially toggle it. But someone with only DOM access cannot turn `document.designMode` off.