tc39 / proposal-dynamic-code-brand-checks

TC39 proposal that enables flexible brand checks before dynamic code loading
MIT License
32 stars 5 forks source link

Simplify slot and pass strings+objects to the host hook #11

Closed lukewarlow closed 8 months ago

lukewarlow commented 8 months ago

Having the string be stored inside of the host slot is pointless as the host can just check the value itself. The original args are now passed through to the host call out.

This also better matches how Chromium implements this behaviour.

Preview

lukewarlow commented 8 months ago

Good catch I completely forgot toString wasn't readonly on trusted types.

Hopefully that's fixed now, by passing the original args through to the host function.

lukewarlow commented 8 months ago

Do you need me to squash commits? (I don't have merge rights btw)