Hacker News new | comments | show | ask | jobs | submit login


And yeah the ad hoc protocol thing is... suboptimal

I put together a caching system so the generated wrapper is made available for overview/manual-patching, etc.... It currently validates the generated file against a generated-from-the-json file at import, and falls back to blindly importing the json file if the tooling to generate the class definition is not available.

Ideally, any patching for the class file should really be done as a subclass, as well as any more complex logic. That way, if the protocol json file is changed, it can be just updated without breaking anything.

Anyways, generated class is here: https://github.com/fake-name/ChromeController/blob/master/Ch...

Oh, as an aside, you're actually missing a significant chunk of the protocol json file, mainly because there are actually two of them. There's a `browser_protocol.json` AND a `browser_protocol.json` file. They're both produced as build artifacts, so I can't point to them in the source, but the total json size should be > 800KB (mirror in chromecontroller: https://github.com/fake-name/ChromeController/tree/master/Ch... ).

As it is, this should kind of just splat into your source tree, but I don't want to move everything around without at least asking you how you want things structured.

ATM I haven't dealt with structure yet, just dumped it into a dir. I'll get a chance to take a look this weekend, many thanks!

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact