RESOLVED INVALID 74755
Web Inspector: Make HTML editable in Resources panel
https://bugs.webkit.org/show_bug.cgi?id=74755
Summary Web Inspector: Make HTML editable in Resources panel
Nikita Vasilyev
Reported 2011-12-16 14:50:40 PST
Would be nice to be able edit HTML the save way as JS (Chrome only) and CSS.
Attachments
Timothy Hatcher
Comment 1 2011-12-17 07:50:50 PST
What would editing the HTML do on save? A full reload?
Nikita Vasilyev
Comment 2 2011-12-17 12:02:18 PST
A full reload would discard all changes unless we save them somewhere. I don't see how it's going to work. 1. The simple solution. Don't reload anything. Create a revision for a file, fire onResourceContentCommitted (Chrome only), and allow to save it. 2. The perfect solution. Update a corresponding node if it present in the DOM at the moment. Example: <html> <head></head> <body> <h1>Header</h1> <div>content</div> <script> onload = function() { var element = document.createElement('div'); element.textContent = 'More content'; document.body.insertBefore(element, document.querySelector('div')); } </script> </body> </html> Replacing "<div>content</div>" with "<div class=content>bla-blah</div>" should update the former node, but don't touch the div element inserted via JS. I don't know yet how to make the perfect solution work, so I suggest to start with the simple one.
Pavel Feldman
Comment 3 2011-12-18 07:19:45 PST
HTML free flow editing has always been an interesting problem to tackle, but I don't think we are doing it any time soon. A valid request though.
Nikita Vasilyev
Comment 4 2011-12-21 15:55:55 PST
I think I can tackle "the simple solution". Is there any chance it will be applied?
Timothy Hatcher
Comment 5 2011-12-21 16:00:15 PST
What is the point of the simple solution?
Nikita Vasilyev
Comment 6 2011-12-21 16:20:25 PST
Inspector as an HTML editor. Mix it with DevTools Autosave and you can save the file and (optionally) do full reload.
Nikita Vasilyev
Comment 7 2011-12-21 16:21:33 PST
(forgot the link) Chrome DevTools Autosave: https://github.com/NV/chrome-devtools-autosave/
Pavel Feldman
Comment 8 2011-12-22 05:15:57 PST
(In reply to comment #4) > I think I can tackle "the simple solution". Is there any chance it will be applied? I am not sure we are ready for that. I am fine with implementing this behind a flag as an experiment though. It might drive more feedback from people that are now trying to edit within the tools.
Note You need to log in before you can comment on or make changes to this bug.