Closed mmarsella closed 7 years ago
Hi @mmarsella !
It's possible that the docs are not quite right :/
I don't have time to review it all everytime I merge a PR or I make some changes (that's why I'm trying to do more tests and working examples, I think they're better for a quick start with this module).
Of course, if you can fix the docs so it's according to the code, I'll really appreciate that!
Let me know if I can help with that :)
Thanks! Lucho
Hello @mmarsella !
I was reviewing this, and the thing is that it's a method in both, the browser and the tab. That's because whenever there's a new tab, the CDP is attached to it and it also may have an initialized state.
So in the docs, what's missing is the docs about the browser object.
I'm gonna update that when I improve the documentation generation (right now it's automatically generated using documentationjs)
Thanks! Luciano
Hello again!
I am trying to call browserIsInitialized on a tab (as its listed in the readMe) or on the browser and both return an error:
mainTab.browserIsInitialized is not a function
orbrowser.browserIsInitialized is not a function
.Here is the example I used:
I looked at your Browser class and it seems like
isInitialized
method returns!!this.client
.I tested that in this example - and that works fine:
The way your documentation is structured - it appears the browserIsInitialized is a method on a new tab (like evaluate, goTo, etc...). Maybe this needs to be listed as a method on the browser instead?
I can make a PR if you would like.
Thanks Lucho, M