worker-dom
worker-dom copied to clipboard
transfer filtering
trying sandboxing a webapp using WorkerDOM. Currently, the <script> attached by the worker thread is executed on the host, so I had to add a filter rule to prevent this.
https://github.com/ampproject/worker-dom/blob/da975ce/src/main-thread/commands/child-list.ts#L38
- if (newNode) {
+ if (filter(newNode)) {
But I think this is too close to implementation detail.
Is there a good place to configure when installing WorkerDOM?