stevenwdv
stevenwdv
@jrandolf nice. First a question: I think for backwards compatibility the `evaluate*` functions should probably retain their first generic type parameter as the type of the function passed to them?...
Oh, actually: TypeScript does not support partially specifying generic parameters, so even if we keep the first parameter the same, no other parameters can be added... I'll see if that...
@jrandolf Ok! I'm struggling a bit with the types, mostly because TypeScript gets a bit confused with the function and string union, since the evaluate functions can also take a...
Actually, I guess it's necessary for dynamically constructed functions... Not sure how to solve this Edit: Although, you can still use `Function(...)` for those, if that's an acceptable solution..? Edit...
I created a draft PR! #8540 Let me know what you think or if you need more info
@jrandolf I just checked and the issue that e.g. `JSHandle` is assignable to `JSHandle` is not fixed yet. This is what I did with the dummy field in `class JSHandle`.
Dupe of #1252
Dupe of #1252 (it's a shame this isn't natively implemented yet)
Why not use [`Array.prototype.at(-1)`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/at) ?
For clarity: This also applies to websites opening new tabs, e.g. `window.open('#', '_blank')` or `x`. The initial request(s?) will not be captured.