Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#1148 closed enhancement (wontfix)

browserIO & iframeIO returns different results for text/html

Reported by: evrim@… Owned by: James Burke
Priority: high Milestone:
Component: General Version: 0.3
Keywords: Cc: evrim@…
Blocked By: Blocking:

Description

When dojo.io.bind is used with text/html, return results are different. It is plain text for browserIO and iframe doucment for iframeIo. It's better to have same type of return value to make parsing easier.

A warning maybe, this would change API and break client apps.

Change History (5)

comment:1 Changed 13 years ago by James Burke

Cc: evrim@… added

The return types for the two transports are different because of incompatibilities with the browsers in the way they can process iframeIO responses. In general, the server response has to be different for the different transports, and IframeIO can't even support XML return types.

Something might be able to be done for text/html to return a string in IframeIO, but I believe the string contents could still differ from the BrowserIO transport. In BrowserIO, we can get the raw HTML text, but for IframeIO, we will always have to get the document object for the iframe and somehow convert it to a text string. That means if you were expecting an HTML fragment for the BrowserIO case, you will likely get a complete HTML document string if we try to convert from the HTML document object in IframeIO. I'm also concerned that in MSIE, we might get back HTML elements and attributes in the wrong case.

Leaving the bug open for now, in case someone else can shed more light on converting, but I'll probably close it as wontfix. There is more info on the IframeIO transport here in the Dojo Book:

http://manual.dojotoolkit.org/WikiHome/DojoDotBook/Book24

Closing as wontfix (working as designed due to browser limitations).

comment:2 Changed 13 years ago by James Burke

Oops, the last note in my last comment said I was closing the bug, but I decided to leave it open to see if anyone else wanted to comment on it before closing it out. From my understanding (see previous comment) I do not believe we can assure the same return type with the two different transports.

comment:3 Changed 13 years ago by dylan

Owner: changed from alex to James Burke

Given the lack of feedback, I suggest either bringing it to the mailing list, or closing it out.

comment:4 Changed 13 years ago by James Burke

Resolution: wontfix
Status: newclosed

Closing out since I believe my analysis of the issue is correct -- it would be very difficult to get a cross-browser solution to work correctly, and it would be subject to many failing edge cases to make the payoff not worth it.

Also, even though there is a common call interface through dojo.io.bind(), not all bind transports operate that same (for instance, ScriptSrcTransport? can't do HTML return types).

comment:5 Changed 12 years ago by (none)

Milestone: 0.4

Milestone 0.4 deleted

Note: See TracTickets for help on using tickets.