Last Comment Bug 60426 - Allow users to choose between generated and source html in view-source
: Allow users to choose between generated and source html in view-source
Status: NEW
: helpwanted
Product: Toolkit
Classification: Components
Component: View Source (show other bugs)
: Trunk
: All Other
: -- enhancement with 18 votes (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
: J. Ryan Stinnett [:jryans] (use ni?)
Mentors:
: 69912 81172 86222 93652 125672 143233 175156 178634 201959 239190 313743 323290 335237 (view as bug list)
Depends on:
Blocks: 276769 79518
  Show dependency treegraph
 
Reported: 2000-11-16 20:41 PST by Brian 'netdragon' Bober
Modified: 2014-03-14 12:08 PDT (History)
55 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description Brian 'netdragon' Bober 2000-11-16 20:41:35 PST
There would be a submenu for View Source. One choice would be Original - giving
you the ability to view the source as it was when it was downloaded. The other
choice would be Translated. This would show the source as it currently is (ie if
there were document.write's etc).
Comment 1 Jesse Ruderman 2000-11-19 03:09:51 PST
This would rock.  The ability to see generated content in view-source needs to 
be implemented anyway so scripters can debug about:blank stuff, but I can't 
find the bug.  (The about:blank problem was mentioned in bug 6119.)

This feature would go well with bug 12111, which suggests several additional 
modes for view source.

See also bug 49721, which wants to be able to view the generated source for the 
selected part of the page.
Comment 2 Asa Dotzler [:asa] 2000-11-20 14:51:10 PST
I'm pretty sure this is already reported
Comment 3 Asa Dotzler [:asa] 2000-11-22 12:45:00 PST
over to AP Apps
Comment 4 Matthew Paul Thomas 2000-11-23 03:56:42 PST
Timeless, *this* is your bug.
Comment 5 timeless 2000-11-27 22:10:31 PST
ok.
Comment 6 Brian 'netdragon' Bober 2000-12-03 09:12:25 PST
See also bug 60437. Also see bug 8589. I assume there are a plethora of
improvement bugs to html editing.
Comment 7 Deven Corzine 2000-12-28 15:12:43 PST
Also see bug 63892.
Comment 8 timeless 2001-05-11 01:17:45 PDT
i'm still stuck by the question in the status or the equivalent question, of 
how do i send a string to view-source...
Comment 9 Boris Zbarsky [:bz] (still a bit busy) 2001-05-11 09:11:07 PDT
I just tried typing in the URL bar:

javascript:window.open("data:text/html,<pre>a\nb</pre>")

and it did the right thing... (though the URL bar is only showing the URL up to
the \n

For more fun try:

javascript:window.open("view-source:data:text/html,<pre>a\nb</pre>")

The thing is, can we depend on this behavior staying this way?
Comment 10 timeless 2001-05-16 08:33:48 PDT
*** Bug 81172 has been marked as a duplicate of this bug. ***
Comment 11 Alexey Chernyak 2001-06-16 08:33:46 PDT
*** Bug 86222 has been marked as a duplicate of this bug. ***
Comment 12 Alfonso Martinez 2001-08-04 10:21:26 PDT
*** Bug 93652 has been marked as a duplicate of this bug. ***
Comment 13 Jesse Ruderman 2001-10-27 04:22:09 PDT
Generated source bookmarklet:
http://www.squarefree.com/bookmarklets/webdevel.html#generated_source
Comment 14 Asa Dotzler [:asa] 2001-12-03 10:32:27 PST
Bugs targeted at mozilla1.0 without the mozilla1.0 keyword moved to mozilla1.0.1 
(you can query for this string to delete spam or retrieve the list of bugs I've 
moved)
Comment 15 Brian 'netdragon' Bober 2001-12-03 14:59:26 PST
I was buggin' along in bugzilla and I realized a good use for this. Making a
javascript to create a certain html output and then freezing the by saving the
generated content and removing the javascript to make it look like you
painstakingly went through and added each output.

You can write a page like this:

<html>
<body>
TEST LINKS OF A BUNCH OF NUMBERS<br>
<script type="text/css">


var i;
for (i=0;i<1000;i++)
{
  if (i!=0) document.write(" | ");
  document.write("<a href='"+i+".html'>"+i+"</a>");
}

</script>
</body>
</html>
Comment 16 Brian 'netdragon' Bober 2001-12-03 15:05:01 PST
Boris: isn't that a bug that the \n isn't shown in the URL bar?
Comment 17 sairuh (rarely reading bugmail) 2002-01-24 14:48:49 PST
mass moving open bugs pertaining to view source to pmac@netscape.com as qa contact.

to find all bugspam pertaining to this, set your search string to
"ItsSharkeysNight".
Comment 18 Axel Hecht 2002-01-30 05:05:34 PST
*** Bug 69912 has been marked as a duplicate of this bug. ***
Comment 19 Axel Hecht 2002-01-30 05:09:22 PST
there is a rough sketch on how this could be done with XSLT in bug 69912
Comment 20 gavin long 2002-02-15 02:58:29 PST
*** Bug 125672 has been marked as a duplicate of this bug. ***
Comment 21 Brian 'netdragon' Bober 2002-03-03 01:55:22 PST
The ability to serialize the dom exists. Therefore, it shouldn't be (too) hard
to create generated source. See bug 128655
Comment 22 Adam Katz 2002-03-04 14:19:06 PST
in addition to comment 13, a bookmarklet (javascript bookmark) to view
tag-colored generated source can be found here in bug 55583#220:
<URL:http://bugzilla.mozilla.org/show_bug.cgi?id=55583#c220>

the javascript tag coloring in that link is not very good, so this shouldn't be
considered a solution, just a temporary fix.
Comment 23 R.K.Aa. 2002-05-09 06:48:52 PDT
*** Bug 143233 has been marked as a duplicate of this bug. ***
Comment 24 Daniel Wang 2002-06-26 11:48:08 PDT
If this is implemented, generated-and-prettified source-view should
be the default for accessibility reasons (as a lynx-like interface).
I doubt the advanced users will complain too much for having to
select the original source-view for debugging, etc..
Comment 25 Boris Zbarsky [:bz] (still a bit busy) 2002-06-26 13:19:17 PDT
As a note, the backend for this exists already:

Ctrl-A, right-click, "View Selection Source" will give you the generated source
of the whole doc.
Comment 26 Jonas Sicking (:sicking) No longer reading bugmail consistently 2002-10-17 19:51:34 PDT
*** Bug 175156 has been marked as a duplicate of this bug. ***
Comment 27 bht237 2002-11-02 14:21:00 PST
As a general comment and especially re Comment #25 :

I would prefer that this view-source mode includes all code not only the
user-selectable part (Ctrl-A, right-click, "View Selection Source" displays only
a subset of the document).

The reason for this is simple:

We need a means to validate _any_ document as a whole, whether it is only partly
or fully generated in the browser. AFAIK Netscape 4 does this perfectly and we
have been relying on this.

Without such a tool, how would one be able to commercially (without dirty tricks
and JavaScript hacks) design web standard compliant client-generated content?

The next obvious thing that is going to come up is view source of generated
framesets which are, AFAIK, not accessible to such a user selection. How do you
do that?
Comment 28 Boris Zbarsky [:bz] (still a bit busy) 2002-11-02 14:26:30 PST
View Selection Source will show you serialized DOM so it is _always_ valid. 
Hence using it to validate anything is pointless.
Comment 29 bht237 2002-11-02 14:46:05 PST
Comment #28 is interesting.

I understand this bug is about _generated_ _source_. Please correct me if I am
wrong. So if I have a bug in my generated source I need a means of feedback to
get rid of this bug.

How can I do that in Mozilla?

Netscape 4 returns the code as document.write() writes it. Ideal for
examination/validation and correction if required.
Comment 30 Boris Zbarsky [:bz] (still a bit busy) 2002-11-02 14:58:47 PST
> How can I do that in Mozilla?

You cannot, and doing it mozilla would require incredible rearchitecting of
either the entire DOM or the cache.  That information is simply not stored
anywhere and storing it would incur a footprint cost that the DOM owner was not
willing to pay, last I checked.

Netscape 4 cached the document in its post-document-write form (as we do for
documents created entirely with document.write()).  This is why it was able to
retrieve the "source".  It's only possible to do this if you don't have to
support the DOM (eg in NS4 the <script> tags are simply gone from the document.
 Since there is no way to access them via DOM, there's no way to tell this.  In
Mozilla that would be very obvious).

So there is some confusion here about what "generated source" is.  To some
people it's "Take the HTML, run all the scripts, remove them from the source,
replace them with the content they wrote out".  To others it's "What source
would I need to write to generate a document equivalent to this one".
Comment 31 bht237 2002-11-02 15:28:37 PST
Thanks Boris for the clarification.

So you are saying that this bug defines "view-source" as
Format 1) "What source would I need to write to generate a document equivalent
to this one"

and _not_

Format 2) "Take the HTML, run all the scripts, remove them from the source,
replace them with the content they wrote out".

AFAIK Netscape 4 only removes those inline scripts that write to the doc not
scripts in the head section.

Now how does Mozilla cache hybrid documents such as:
<BODY>
document.write(parent.getSomeContent());
</BODY>
?
With hybrid I mean that they are files loaded over the network that include any
number of document.write() scripts.

If I could get the complete document in Format 2) I would be very happy.
I am just trying to find a way out of this dilemma that is format 1) is actually
fairly useless for an application designer.
Comment 32 Boris Zbarsky [:bz] (still a bit busy) 2002-11-02 15:36:42 PST
I'm not saying anything about how this bug defines it.... because as far as I
can tell both definitions are present in various places in this bug.

> AFAIK Netscape 4

Inside <body>:

<script>
var foo = 1;
document.write(foo);
</script>

The script will be removed.  But the "1" can be used by later scripts in the
document!  Oh, and scripts in <head> can also document.write()... the point is,
all those script nodes need to be present in the DOM.

> Now how does Mozilla cache hybrid documents such as:

I'm not sure what this question is asking... we cache the original source and
when the document is loaded we parse it, run all the scripts, etc...
Comment 33 bht237 2002-11-02 16:13:30 PST
>> Now how does Mozilla cache hybrid documents such as:

>I'm not sure what this question is asking... we cache the original source and
>when the document is loaded we parse it, run all the scripts, etc...

Thanks. So I understand a hybrid document is not cached as DOM the same as a
100% generated document. Meaning if it is taken out of the cache then it is
parsed again. In other words this opens the opportunity to process it
differently in view-source mode which is good news.

I am writing this in response to the concern:

"You cannot, and doing it mozilla would require incredible rearchitecting of
either the entire DOM or the cache.  That information is simply not stored
anywhere and storing it would incur a footprint cost that the DOM owner was not
willing to pay, last I checked."

So I am speculating that a hybrid document does not require this footprint cost
because nothing needs to be done beforehand to prepare such a document for later
view-source presentation. It might just be a matter of taking it out of the
cache and re-process it differently. I mean we don't have to store the generated
source in the cache in any way such as "wyciwig".
Of course one would have to care about the JavaScript context such as parent,
top etc. because document.write() might get content from there.
Comment 34 Boris Zbarsky [:bz] (still a bit busy) 2002-11-02 16:22:41 PST
Yes... and in general rerunning scripts for view-source is a somewhat risky
proposition security-wise... But yes, that could maybe be done.  It would
involve modifying the parser and script loader a good amount...
Comment 35 bht237 2002-11-02 17:07:23 PST
That sounds very promising, very high value for developers.

We could get by, by prototyping with data-pulling skeletons such as:

<!--Begin of file -->
<SCRIPT>
document.write(otherWindow.getSomeContent());
</SCRIPT>
<!--End of file -->

or, until the cross window security issues are resolved:

<!--Begin of file (extremely simplified, for this we would not need view source
obviously)-->
<HEAD>
<SCRIPT>
var someContent = "<BODY>SomeContent</BODY>";
</SCRIPT>
</HEAD>

<SCRIPT>
document.write(someContent);
</SCRIPT>
<!--End of file -->

Then we could examine the code with view-source and run it through our
validation processes.

When prototyping is finished we can move this to production safely as:

otherWindow.document.open();
otherWindow.document.write(getSomeContent());
otherWindow.document.close();

and then we don't need to care about Format 2) not being available to us in 100%
generated content.

I think this method would have tremendous commercial value.

Please correct my if I am wrong but I do not know of any alternative to this
except using Netscape 4 which is a very risky preposition.
Comment 36 Boris Zbarsky [:bz] (still a bit busy) 2002-11-02 17:21:56 PST
You could use a server-side scripting environment to test...

Note that the changes required to do this in Mozilla would be pretty widespread
and risky, as I said....

Don't mind me, though.  I'm just offering technical advice.  ;)
Comment 37 bht237 2002-11-03 12:27:04 PST
For those who might be interested and aren't already aware of it:
view-source is broken in the context of multiple windows/frames.
For me this means I can't use view-source.

View Source doesn't show the source generated by JavaScript
    bug 172251

Hope this helps, maybe priority-wise.
Comment 38 Sebastian Biallas 2002-11-06 04:52:58 PST
*** Bug 178634 has been marked as a duplicate of this bug. ***
Comment 39 Mart Rootamm 2002-11-06 05:33:33 PST
Mozilla could do it like this: when such a ViewSource option for a certain 
page is demanded, then it could get the page the way Netscape 4 does it: 
download it (save it like Netscape 4 saves pages in its cache), then process the 
page and then show generated source. I guess that would require some changes to 
the cache.

And here are all the important arguments:

Boris Zbarsky:
> You cannot, and doing it mozilla would require incredible rearchitecting of
> either the entire DOM or the cache. That information is simply not stored
> anywhere and storing it would incur a footprint cost that the DOM owner was 
> not willing to pay, last I checked.
-- I didn't understand the last part of the sentence or most of the programming 
vocabulary. How would either of these comments (by Zbarsky & NZ guy) be 
reflected in English?

NZ guy:
> Thanks. So I understand a hybrid document is not cached as DOM the same as a
> 100% generated document. Meaning if it is taken out of the cache then it is
> parsed again. In other words this opens the opportunity to process it
> differently in view-source mode which is good news.

What is important to most web developers (who happen to have extensive use of 
JavaScript):
> So if I have a bug in my generated source I need a means of feedback to
> get rid of this bug.

and
> We need a means to validate _any_ document as a whole, whether it is only 
> partly or fully generated in the browser.
-- This means: We need to see all of the document in ViewSource where it shows 
HTML written by JavaScript (through document.write or through a function the 
like).

Another option would be for the JavaScript debugger to do the same (to show HTML 
instead of JavaScript) or something similar, but show more at the place of an 
error than it does now.

So if Boris Zbarsky's comment (whatever he means there with risk and security) 
prevails, then we just would have to stick with Netscape 4 (4.8 and the like).
Comment 40 Axel Hecht 2002-11-06 08:54:22 PST
I suggest WONTFIXing "view-source of charstream as seen by the parser".

Doing that for all documents will cause Mozilla to use considerably more memory,
so that's a nogo.
Doing it only on demand, that is, if somebody called this version of view-source,
would require reevaluating the scripts, and re-apply all the side effects. I 
expect to cheer if they loose all their frame navigation just due to a 
view-source.

Mart, I suggest rethinking your publishing structure. But if you really want to
rely on document.write in situations complicated enough that they fail and want
the source as the parser sees it in Mozilla to verify that, I guess the best 
thing you can do is create your own build, and modify the parser to feed all
it's input to some file, or so.
Comment 41 Boris Zbarsky [:bz] (still a bit busy) 2002-11-06 09:00:26 PST
> How would either of these comments

1)  Mozilla does not store the "document with all document.write() evaluated"
    anywhere, unlike NS4
2)  Doing so would be prohibitively expensive in two or more of the following:
    cache space, memory, performance

I second Axel's suggestion that moving to a model that does not rely on
document.write is much more fruitful than trying to debug code that uses it.
Comment 42 bht237 2002-11-06 10:34:33 PST
Everything has been said here. The facts are on the table.
View-source has become slightly ambiguous since Mozilla.

1) Viewing written source as in NN4 is no longer supported. This is the subject
of this bug and there cannot be any confusion otherwise this bug should not exist.
This is the source combined from static HTML and from HTML written by
document.write().

2) View source generated retrospectively by the DOM has only academic or
educational value. It is definitely different from what document.write() puts out.

The issue here is that a solution is required especially for architectures that
are true client-server. In a client-server environment, the dynamic content is
kept isolated from the presentation. In other words the dynamic portion of the
content contains no HTML.

For this architecture it is a natural requirement that dynamic HTML pages are in
fact templates that pull their content from JavaScript data.
Such template documents are what I called previously "hybrid" because they
contain multiple scripts with document.write().

It happens that only for those template type of pages, which would be easiest to
support by Mozilla without cacheing (refer to comment #33), are causing a
serious problem for developers.

In other words:

A page that only exists as 100% document.write() output could for design/QA e.g.
HTML validation purposes be written to an alternate source and be inspected by
the designer. Problem solved.

A hybrid/template page that exists as a URL on the network, either server
generated or stored as a file, cannot, without heavy manipulation, be inspected
for correctness.

This is a shame because it makes Mozilla useless as a true client-server
application platform.
Unless of course one completely abandons document.write() and uses other dom
methods do generate content. Funny enough that would at the time of writing
require separate solutions for different browsers, which is not a good ide where
Mozilla/Netscape 7 has close to 0% market share. In 10 years time maybe
document.write() is no longer used. But that's not subject of this bug; Mozilla
needs to be fixed for what is required now.

Mozilla should take this opportunity, get over the pain it takes to implement this.

Alteratively one could of course write this off, mark for oneself Mozilla as a
whole WONTFIX and get on with the job using Netscape 4 as the only alternative.
Comment 43 Boris Zbarsky [:bz] (still a bit busy) 2002-11-06 13:08:20 PST
> that pull their content from JavaScript data.

Why javascript data?  What you have described so far sounds to me like it would
be much more cleanly and efficiently (in terms of server cycles, client cycles,
and latency) dealt with via SSI or a similar server-side mechanism...

People keep bringing up NS4.  Repeat after me.  NS4 did not have a DOM.  This
made doing this much easier in NS4.  Show me a single DOM-enabled browser that
can do this properly!

I'm not saying it's not possible.  I'm saying that I don't believe that the
hundreds of developer hours needed to do this are worthwhile.  It would be a
neat feature to have, but really not worth the amount of work that would have to
be put in (we're talking months of work, most likely).  And until you find
someone who _does_ believe it (as you apparently do) and is willing to volunteer
that much of their time to do it (which you apparently are not) this bug is not
very likely to move forward.... (one more thing to keep firmly in mind -- this
is a volunteer effort; people work on things that they want to work on; if
something is wanted by enough people, surely one of those people will be found
who is willing to work on it. See the "helpwanted" keyword.).  That said, if
someone _is_ willing to work on this and needs pointers/advice/someone to bounce
ideas off of, feel free to mail me.
Comment 44 Brendan Eich [:brendan] 2002-11-06 13:28:55 PST
bht: do you really need Mozilla (the default build) to support original,
generated, and hybrid view-source?  Or would you be ok with a special version of
Mozilla, or a tool like DOM inspector?

Everyone: the reason this worked easiliy in 4.x (easily, modulo nasty bugs to do
with the spaghetti control flow between old netlib and layout) was because all
document.write did was loop back through the parser, via the same (or a proxy,
don't ask) netlib stream that the original tags came in on.  So interposing a
"tee(1) [unix program]" caching stream convertor was relatively straightforward,
and guaranteed to capture all the tags (original and generated).  The wysiwyg:
URL was invented to name the resulting generated document.

We have wyciwyg: in Mozilla now, does that not help?  Hmm, I just read bug
172251 and wonder if that's the bug to focus on.  Is the problem that even if we
fix that bug, we don't cache original source, and can't reconstruct it from the
dom content model?

Anyway, expanding the disk cache to include more generated and original source
is not obviously a memory buster.  So I don't agree with bz's comment #41 point
(2), esp. as document.write may be uncommon enough that most pages (top100?)
won't suffer any performance penalty.  Without studying the performance of a
prototype, I wouldn't want to say how badly a cache convertor would be, if it
could be interposed.  It'd want to write the cache file asynchronously, for
sure, so long as the cache subsystem could coherently hit the buffers being written.

If this is too much work for the default-built code paths, then maybe someone
can cobble up a helper tool.  I don't see a need to WONTFIX, although the bug's
current summary may need to change.

Timeless, are you serious about hacking on this?

/be
Comment 45 Brendan Eich [:brendan] 2002-11-06 13:39:28 PST
Mid-air with bz: want to reiterate that I'm not proposing the default-built code
paths worry about this bug, but it does seem to me valid to want something like
DreamWeaver or a similar authoring/debugging tool to do the right thing.  That's
the direction to morph this bug, if there is enough interest.

"Two way tools" or verbatim roundtrip source recovery or whatever you want to
call it is a required virtue in such power tools.

/be
Comment 46 bht237 2002-11-06 14:21:11 PST
Thanks Brendan and Boris for your comments.

Brendan, NN4 for _me_ is definitely a power IDE and I doubt that this has come
about by coincidence i.e. I think the Netscape developers were smart to get it
there.

I cut and paste between frame URLs in page info (frame info not available in Moz
yet) and external editor macros that translate these into local file names.

And I use the old debugger applet with the nice object inspector which is - well
- worth some money but it comes free.

That proves the concept for me that one can build a fairly complete environment
with external tools and maybe Mozilla can support such a basic open approach as
well.

Unfortunately view-source is pivotal because the browser is the only point of
reference and any server side workarounds simply don't cut it as they introduce
new mismatches, uncertainties etc. I am talking about QA here, rock solid
development support - not being interested in viewing pretty-printed source code
for whatever reason. Give me a hidden wyciwig URL that I have to calculate or
something crude - it doesn't matter to me how difficult it is.

If there was a tool that I had to download separately or a hidden preference
that would be fine. Whatever it is, it should tackle the most difficult task of
viewing the source of combined static HTML and inline document.write().

Sorry to repeat this but this is really the issue where all known methods fail
and its solution from what Boris and you seem to agree would be easiest to
implement. A kind of a sweet spot that I would hate to see WONTFIXed.

That functionality is needed to develop forward looking high performance
applications not the basic 99% sites. I seem to think that document.write() is
not the ultimate solution since we have the DOM but it is an indispensible tool
to bridge the gap between browser generations in use today.
Comment 47 Mike Shaver (:shaver -- probably not reading bugmail closely) 2002-11-06 14:38:01 PST
Does the DOM WG's serialization stuff help us here?  As a save-as option, or --
better -- a DOM-inspector-like web-developer add-on, it might be sufficient.
Comment 48 Boris Zbarsky [:bz] (still a bit busy) 2002-11-06 14:49:09 PST
shaver, see comment 28 and on.  Oh, and the W3C serialization stuff is for XML
only.  At least with XML you know the source is well-formed, so there
serializing the DOM is a fairly accurate representation of the source.
Comment 49 Mart Rootamm 2002-11-08 02:53:18 PST
bht/NZ:
> I cut and paste between frame URLs in page info (frame info not available in 
> Moz yet) and external editor macros that translate these into local file 
> names.

Frame info is readily available in Mozilla. In a frame, request the context 
menu with in the frame area, then This Frame > View Frame Info; you can also do
this when you request the context menu (within the frame) and type h and i to
view frame info.

> That functionality is needed to develop forward looking high performance
> applications not the basic 99% sites. I seem to think that document.write() is
> not the ultimate solution since we have the DOM but it is an indispensible 
> tool to bridge the gap between browser generations in use today.

Using document.write and browser identification to 'bridge the gap between
browser generations' is important, but this kind of Viewsource for Mozilla is
needed, as Netscape 4 shows only the source that only applies to it. For example, 

if Netscape4, then write this;
else write that

and Viewsource shows only the code written for N4. That is why to have N4's
current viewsource functionality or the way it presents itself is very
important, as I need to evaluate code written for Moz. JavaScript errors in Moz
also seem to show less than in N4 (IE seems to be worst of all) and the
JavaScript Debugger (or Venkman) is of no use to me. And fonts in its
(Venkman's) sections are too large. /-Mart.
Comment 50 Axel Hecht 2002-11-08 03:02:36 PST
http://lxr.mozilla.org/seamonkey/source/htmlparser/src/nsParser.cpp#2594
seems to have this for debug builds.
Mart, call this function in a debug build and be done.

Reiterating, I think that Mat's kind of view-source should not be in default 
builds. It's very useful for him, and it seems that he might have a good chance
to get to the information he wants in debug builds.
Pretty sure we should not worry about a UI for this, or a real interface.
Comment 51 bht237 2002-11-08 03:27:32 PST
Mart I agree with you. I should have said that itentifying frames is not
"complete" in Mozilla because we can't get at the source/URL of a framesetter
within a frameset and a frame that has 0 width and height.
But I have read somewhere in bugzilla that a frame hierarchy view as in NN4 is
planned.
Comment 52 timeless 2002-11-08 04:03:06 PST
i was more interested in generated (dom) source than generated (inline) source.
doron says that the evang sidebar can do that already. as for generated inline,
i'm not bloating our parser for it.
Comment 53 Doron Rosenberg (IBM) 2002-11-20 10:01:21 PST
Go to http://mozilla-evangelism.bclary.com/sidebars/, and install the Milla
Source Generator sidebar.  
Comment 54 Boris 'pi' Piwinger 2003-04-14 07:32:07 PDT
*** Bug 201959 has been marked as a duplicate of this bug. ***
Comment 55 Vedran Miletic 2003-10-05 08:19:17 PDT
retargeting
Comment 56 Boris Zbarsky [:bz] (still a bit busy) 2004-03-30 16:38:26 PST
*** Bug 239190 has been marked as a duplicate of this bug. ***
Comment 57 Brian 'netdragon' Bober 2005-08-04 12:38:37 PDT
Implementing this bug would be useful for us at Eyewonder because our
interactive ads (such as expandable ads) placed on portal sites actively modify
the pages' DOM from javascript files, and it's not possible to see the generated
content in view source for debugging purposes (such as having javascript
inserting HTML comments in DOM). Note that DOM Inspector does show the changes,
but that's not very handy for quick looks. We're therefore forced to use
javascript alerts only.

What would work well is to be able to click (or double-click) on lines that
include other content such as ( <javascript src="foo.js" ) and <link> tags and
the external file would expand in place of that line. Clicking again would close it.

See also bug 120457 - "Save As" should optionally allow to save generated
content of a page
Comment 58 Boris Zbarsky [:bz] (still a bit busy) 2005-08-04 13:20:42 PDT
> and it's not possible to see the generated content in view source 

Select-All, and then view selection source.
Comment 59 Brian 'netdragon' Bober 2005-08-05 07:29:50 PDT
I realized that comment #57 was not exactly relevant to this bug, but instead
bug 17612. Expanding <link>ed to and <script src="foo.js"> files is not showing
generated content, and even when it's javascript, the document.write causes
things to be placed in the DOM under the script element. Therefore, ignore
comment #57 with respect to this bug. I moved the comment to bug 17612, comment #19.

Boris: Thanks for the tip about "view selection source" to show generated
content, that'll be very useful.
Comment 60 Josh Birnbaum 2005-10-25 23:32:36 PDT
*** Bug 313743 has been marked as a duplicate of this bug. ***
Comment 61 Elmar Ludwig 2006-01-13 07:00:42 PST
*** Bug 323290 has been marked as a duplicate of this bug. ***
Comment 62 Elmar Ludwig 2006-04-24 08:22:31 PDT
*** Bug 335237 has been marked as a duplicate of this bug. ***
Comment 63 Philip Chee 2010-06-05 05:19:13 PDT
SeaMonkey trunk is now using toolkit viewsource.

Note You need to log in before you can comment on or make changes to this bug.