GoogleChromeLabs / carlo

Web rendering surface for Node applications
Apache License 2.0
9.31k stars 309 forks source link

Add evaluateOnNewDocument method to API #72

Closed alexkozy closed 5 years ago

alexkozy commented 5 years ago

I need some data to be synchronously available in app from its start. E.g., I would like to fetch settings from my own storage and inject them to the app by evaluating on new document something like:

evaluateOnNewDocument(`Settings = { a: 1, b: 2, c: 3}`);

I can create file with settings somewhere in temporary directory and then serve it but it looks much less convenient.

pavelfeldman commented 5 years ago

You should be able to serve this via network interception now.