Side navigation
#10604 closed enhancement (wontfix)
Opened October 27, 2011 10:42PM UTC
Closed November 01, 2011 11:33PM UTC
$(...).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: |
Description
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:
Attachments (0)
Change History (2)
Changed November 01, 2011 09:06PM UTC by comment:1
Changed November 01, 2011 11:33PM UTC by comment:2
component: | unfiled → manipulation |
---|---|
priority: | undecided → low |
resolution: | → wontfix |
status: | new → closed |
type: | bug → enhancement |
This is feature creep. It is far too simple to pass a string or function.
According to the jquery docs, the
html
method only expects a string or a function:http://api.jquery.com/html/
I don't know if the interface should be changed, but here is a patch that will do it:
https://github.com/chriswu000/jquery/commit/66920cfeb2c488eb377b1ce4e1246dcd44c5359f