Open alexarg opened 8 years ago
I believe the published Script.jQuery nuget package only supports jQuery up to version ~1.10 which i don't believe had support for the Promises/A+ specification.
Since Script# is no longer actively maintained, i would suggest you fork: https://github.com/nikhilk/scriptsharp/tree/cc/src/Libraries/jQuery make whatever changes are needed and publish a new nuget package.
jQuery promises implement Promises/A+ specification, and hence support this part of the spec:
2.2.7.1. #If either onFulfilled or onRejected returns a value x, run the Promise Resolution Procedure see the documentation here: https://promisesaplus.com/#point-41
ScriptSharp's IDeferred wrapper for the promise doesn't support returning values from onFulfilled callbacks at all, because Action and Callback are defined as delegates that always return void. Here are JavaScript example scenarios that won't be possible to implement in ScriptSharp because of this problem:
JSFiddle: http://jsfiddle.net/alexarg/dzzj13h4