1

I'm currently using var bodyHTML = document.body.innerHTML; to get the HTML of the body of the webpage. If I edit or modify some information in the HTML in the "Inspect Element" panel on Chrome, I would like to make copies of this HTML. Furthermore, this question really extends to HTML/CSS/JS. I want to gain this data through code, not through right clicks and copying the data, as I want to eventually make new files based on this modified HTML/CSS/JS.

Is it possible to gain access to this browser-modified HTML/CSS/JS?

4
  • Only way I can think of doing this is by modifying the developer-console code in the Chromium Open-Source Project Commented Jun 25, 2012 at 6:40
  • Not sure what you want to do in here. But based from the information that you have given you're getting the whole html from the page and then you want to modify it and then after modifying it you want to inject it again into the page. But what I can't understand is the purpose. You can simply use ajax to inject anything into the page, Can you explain why you want to do this. Commented Jun 25, 2012 at 6:48
  • Should this run on any client? Or could it be a server side thing? In the latter case you might find phantomjs.org useful, but it really depends on what you are trying to do. Commented Jun 25, 2012 at 6:54
  • In Firebug, you can edit the code and then when you go to "Edit" under the HTML Inspect panel and it will show you the code, with the changes you have made. Commented Jun 25, 2012 at 16:44

1 Answer 1

1

So you want to save your live modifications (I'm not sure I really understood)? for that you can use the chrome auto save extension, you have instructions here too, but it's may be outdated, so have a look at the README ;)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.