fix(JSHandle.toString): clearer description for primitives (#993)

This patch:
- updates JSHandle.toString to make a nicer description for primitives
- excludes JSHandle.toString from documentation to avoid its abuse

References #382
This commit is contained in:
Andrey Lushnikov
2017-10-10 10:54:20 -07:00
committed by GitHub
parent c3fb367148
commit 079db90066
5 changed files with 15 additions and 9 deletions

View File

@@ -184,7 +184,7 @@ class JSHandle {
const type = this._remoteObject.subtype || this._remoteObject.type;
return 'JSHandle@' + type;
}
return helper.valueFromRemoteObject(this._remoteObject) + '';
return 'JSHandle:' + helper.valueFromRemoteObject(this._remoteObject);
}
}