Demonstrating a bug in diffHTML's handling of SVG elements

When diffHTML's innerHTML() function is used to modify an SVG in the page, diffs which require a new node to be inserted to the SVG's DOM (such as changing an element's tag) will fail to re-render the SVG in the browser's view. Notably, diffs which only cause an attribute to be altered (such as changing an element's color) will render just fine.

This page is a demonstration of the above issue. The SVG rendered in the box below can be altered by toggling either its color or its shape, using either of two methods: setting its .innerHTML property directly, or using diffHTML's innerHTML() function.

Notice that when the shape is changed via diffHTML, the picture goes blank instead of displaying a new shape. However, the underlying SVG's DOM has in fact been changed, as can be confirmed by the altered text in the textbox below, or using the element inspector tools in your browser.

This bug has been reported as ticket #185 on the diffHTML issue tracker.

The bug has now been resolved, but this page is pinned to the version of diffHTML which exhibits the bug.






(exhibits bug)

Current innerHTML of picture: