Bug Tracker

Opened 11 years ago

Closed 11 years ago

#10604 closed enhancement (wontfix)

$(...).html(object) should use its custom toString() method.

Reported by: jdalton Owned by:
Priority: low Milestone: None
Component: manipulation Version: 1.7b2
Keywords: Cc:
Blocked by: Blocking:


I was messing around with $(...).html(....) and was surprised that it didn't use my object's custom toString() method.

You can see an example here: http://jsbin.com/uqazuk

Change History (2)

comment:1 Changed 11 years ago by chriswu000

According to the jquery docs, the html method only expects a string or a function:


I don't know if the interface should be changed, but here is a patch that will do it:


comment:2 Changed 11 years ago by timmywil

Component: unfiledmanipulation
Priority: undecidedlow
Resolution: wontfix
Status: newclosed
Type: bugenhancement

This is feature creep. It is far too simple to pass a string or function.

Note: See TracTickets for help on using tickets.