Bug 20663 - Ability to export the current markup, javascript and CSS to a file
Summary: Ability to export the current markup, javascript and CSS to a file
Status: RESOLVED WORKSFORME
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 525.x (Safari 3.1)
Hardware: All All
: P2 Enhancement
Assignee: Nobody
URL:
Keywords:
: 31667 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-09-05 07:08 PDT by mathuaerknedam
Modified: 2010-11-03 05:08 PDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mathuaerknedam 2008-09-05 07:08:19 PDT
It would be really nice to be able get all of the text out of the middle inspector pane. If I select <html> and press cmd-c I get the contents of <html>, but not the contents of any elements are exposed by a downward disclosure triangle. At the moment it appears the my only option is to get a series of screenshots or copy each element individually.
Comment 1 Timothy Hatcher 2008-09-05 20:42:21 PDT
I am not sure I follow, can you explain more?
Comment 2 Paul Bakaus 2009-11-20 01:40:46 PST
I think what he wants is an export function - the number one requested feature for all debuggers in any browser. The ability to export the current markup, javascript and CSS to a file.

The ticket probably needs a more generic title though and a better explanation. I had a couple of ideas on this already, obviously it's a  tricky problem to solve. Many people simply want to hack some code and change some styles, then hit the "Save" button to save the files back onto their drive.

Two things here:

1) A basic export. Take the computed DOM representation and transform it back into linear markup+style, then offer as download. Should be doable.

2) Detect if local files are opened (file://) - if yes, show a save button that matches the computed and altered code back to the original source. Extremely difficult because the DOM isn't static - however, it could work out for CSS (external) and by tracking portions of the markup not altered by JavaScript.
Comment 3 Alexei Masterov 2010-07-07 07:51:36 PDT
Changing the subject to better reflect the nature of this feature.

Currently we are working on a feature (38578) that allows for a CSS export.  I 
am enetering it as dependency for this one, because it will be the first step 
towards making a full-featured exporter.
Comment 4 Alexei Masterov 2010-07-07 08:27:58 PDT
*** Bug 31667 has been marked as a duplicate of this bug. ***
Comment 5 Alexei Masterov 2010-07-07 08:44:58 PDT
Just to clarify, we'll be using this feature request to track much-requested 
feature that implements functionality similar to that of firediff.

Users want an ability to export the changes that they made using live-editing 
of Javascript, CSS, and/or the DOM markup.
Comment 6 Alexander Pavlov (apavlov) 2010-09-10 03:15:42 PDT
The copying of entire DOM subtree contents works as the bug author describes.