Bug Tracker

Changes between Initial Version and Version 1 of Ticket #10550, comment 27

Mar 3, 2014, 8:39:18 PM (5 years ago)


  • Ticket #10550, comment 27

    initial v1  
    11jQuery doesn't control the serialized HTML string representation of some DOM in the document when you use the `.html()` method, that's the browser's job and some do it better than others. Once it is a serialized HTML string representation, it's pretty much impossible for jQuery to go through that arbitrarily large serialized HTML string representation of a DOM, compare it to the DOM from where it came, and "fix" the serialized HTML string representation to match the DOM. To do that, we'd need an HTML parser in jQuery. We don't have an HTML parser in jQuery, which is why we use the `.innerHTML` method from the browser.
     3Alternatively we could go through the DOM before serialization and attempt to find all the checkboxes, then set their attributes (vs properties). That's again a very expensive operation for a special case. If you know you are cloning checkboxes and need the cloned representation to reflect the dynamic value, you can easily set it yourself.
    36Sorry. If you have some idea for a fix please let us know. Complaining that we aren't fixing it won't help since I don't think we can fix it.