Side navigation
#14374 closed feature (plugin)
Opened September 19, 2013 04:43PM UTC
Closed September 29, 2013 08:52PM UTC
$.param without serializing function results
Reported by: | norman.pellet@gmail.com | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.10.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Is it possible to add an option in $.param so that functions are purely and simply ignored from the serialization ?
Line 7499 (v1.10.2)
value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );
Currently, functions are executed and the result is serialized. In many case, the end-user simply wants the key/values of his native object to be serialized and functions left out.
Attachments (0)
Change History (1)
Changed September 29, 2013 08:52PM UTC by comment:1
resolution: | → plugin |
---|---|
status: | new → closed |
The documentation for
$.param()
explains that it calls the function and uses the return value. APIs that need additional arguments to modify their behavior get ugly really quickly. We already have thetraditional
argument there. This is a low-level method intended mainly for use by$.serialze()
. If you have special needs just wrap it with your own method or use a better option like JSON.