I ended up modifying ClearScript source to solve this problem.
I modified HostItem
I modified HostItem
private bool BindSpecialTarget<T>(out T specialTarget) where T : class
and included the following code at the beginning of the method: if (typeof(T) == typeof(IDynamic))
{
if (target.Type.IsCOMObject)
{
T dyn = this.engine.MarshalToHost(target.Target, false) as T;
if (dyn != null)
{
specialTarget = dyn;
return true;
}
}
}