Introduce an intermediate prototype to the target object and that sets the toStringTag on that prototype,
this avoids directly modifying the target object and also allows multiple different "types" to be
applied to the same target object if required.
This is done as a best effort approach and may not always succeed due to security / object model restrictions
So if it fails then it will fallback to just defining the toStringTag on the target object, which also may fail
resulting in no change.
Introduce an intermediate prototype to the target object and that sets the toStringTag on that prototype, this avoids directly modifying the target object and also allows multiple different "types" to be applied to the same target object if required. This is done as a best effort approach and may not always succeed due to security / object model restrictions So if it fails then it will fallback to just defining the toStringTag on the target object, which also may fail resulting in no change.