anchor.diff:    if value = Undefined.Instance then
       exit nil;
   
  +  with matching wrapper := EcmaScriptObjectWrapper(value) do
  +    exit ConvertTo(wrapper.Value, &type);
  +
  +  // Unwrap EcmaScriptObject before conversion
  +  with matching wrapper := EcmaScriptObject(value) do begin
  +    if wrapper.Class = 'Date' then begin
  +      if wrapper.Value.GetType() = typeOf(DateTime) then
  +        value := DateTime(wrapper.Value).ToLocalTime()
  +      else
  +        value := GlobalObject.UnixToDateTime(Convert.ToInt64(wrapper.Value)).ToLocalTime();
  +
  +      exit ConvertTo(value, &type);
  +    end;
  +
  +    // For arbitrary EcmaScriptObject objects their .toString() method is called
  +    if &type = typeOf(String) then
  +      exit value.ToString();
  +
  +    if assigned(wrapper.Value) then
  +      exit ConvertTo(wrapper.Value, &type);
  +  end;
  +
     if &type.IsAssignableFrom(value.GetType()) then
       exit value;
   
  -  with matching wrapper := EcmaScriptObjectWrapper(value) do
  -    exit ConvertTo(wrapper.Value, &type, useCurrentCulture);
  -
     // Special cases
  +{$REGION Double -> DateTime }
     // Double -> DateTime conversion
  -  if (&type = typeOf(DateTime)) and ((value.GetType() = typeOf(Int64)) or (value.GetType() = typeOf(Double))) then
  +  if (&type = typeOf(DateTime)) and (value.GetType() in [ typeOf(Double), typeOf(Int32), typeOf(Int64), typeOf(UInt32), typeOf(UInt64) ]) then
       exit GlobalObject.UnixToDateTime(Convert.ToInt64(value)).ToLocalTime();
   
     // Implicitly convert Date to its String representation while sending it to .NET code
     if value.GetType() = typeOf(DateTime) then begin
  -    if useCurrentCulture and (&type = typeOf(String)) then
  +    if &type = typeOf(String) then
         exit Convert.ChangeType(value, &type, System.Globalization.CultureInfo.CurrentCulture);
   
       // Implicit DateTime -> Double conversion
       if &type = typeOf(Double) then
         exit GlobalObject.DateTimeToUnix(DateTime(value));
     end;
  -
  +{$ENDREGION}
  +
  +{$REGION Boolean }
     // Special-case Boolean conversions
     if &type = typeOf(Boolean) then begin
       // Number.NaN equals to false in JS while .NET converts it to true
  
positive.code:   var lMethods := methods;
  
    for  i: Int32  :=  0  to  length(parameters)-1  do  begin
      with matching objectWrapper := EcmaScriptObjectWrapper(parameters[i]) do begin
        parameters[i] := objectWrapper.Value; // if these were wrapped before, we should unwrap
        continue;
  
negative.code: end;
  
  
  class method EcmaScriptObjectWrapper.ConvertTo(value: Object;  &type: &Type): Object;
  begin
    if (not assigned(value)) then
      exit nil;
  
    // Undefined Double is Double.NaN, not just nil
    if (&type = typeOf(Double)) and  ((value = Undefined.Instance) or (not assigned(value))) then
  