Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #204 (closed enhancement: wontfix)

Opened 13 years ago

Last modified 12 years ago

[PATCH] DOMSerializer for Kid to MochiKit

Reported by: jchu@… Owned by: anonymous
Priority: normal Milestone:
Component: Kid Version:
Severity: normal Keywords:
Cc:

Description

The attached class can be used to pass DOM calls back to the browser through JSON calls. The resulting rendered text can be eval'ed to create the DOM objects.

To use this takes two lines: widgetInstance.template.serializer = DOMSerializer() widgetInstance.render(format=None)

Attachments

dom.py Download (1.9 KB) - added by jchu@… 13 years ago.
dom.2.py Download (2.3 KB) - added by jchu@… 13 years ago.
Fix for some whitespace issues

Change History

Changed 13 years ago by jchu@…

comment:1 Changed 13 years ago by michele

  • Summary changed from DOMSerializer for Kid to MochiKit to [PATCH] DOMSerializer for Kid to MochiKit

comment:2 Changed 13 years ago by jchu@…

There is one bug related to intentional whitespace surrounding text nodes in this code. I have a newer version that I can upload later.

I've found that IE's dom implementation doesn't do the same checks as when it parses HTML, so you get weird results using the DOMSerializer. Because of this, I've stopped using it.

Changed 13 years ago by jchu@…

Fix for some whitespace issues

comment:3 Changed 13 years ago by kevin

  • Status changed from new to closed
  • Resolution set to wontfix

Given Jason's comment from 12/31 ("I've stopped using it"), I'm going to close this ticket ("wontfix"). We can always point here if someone else is interested in trying to work through issues. innerHTML works well enough for most purposes, though.

Note: See TracTickets for help on using tickets.