You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seaside's response is viewed by browsers as a string without line-breaks.
Normally this isn't a problem as the browser "pretty-prints" the output when
inspecting the html.
However when debugging javascript, either inline or within a file-library the
script debugger (I'm currently using Safari) shows the output as a single line
- which makes it impossible to interpret any javascript generated errors
("syntax error: line 1"!!) or to set meaningful breakpoints.
I've discovered that calling #withInternetLineEndings on the file-library
string results in browsers interpreting the line-endings as expected.
Locally when I'm debugging I've created a class derived from WAHtmlDocument,
which overrides #nextPutAll:
WAHtmlDocumentWithInternetLineEndings>>#nextPutAll: aString
super nextPutAll: aString withInternetLineEndings
and I modify WAFileLibrary>>#handle: modifying the WAResponse>>#document: to:
document: ((self documentForFile: fileName) withInternetLineEndings)
Is there a better solution?
Original issue reported on code.google.com by Nick.A...@gmail.com on 7 Aug 2011 at 10:31
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
Nick.A...@gmail.com
on 7 Aug 2011 at 10:31The text was updated successfully, but these errors were encountered: