Update: Nevermind, I found this <https://github.co...
# kobweb
s
Update: Nevermind, I found this https://github.com/varabyte/kobweb/blob/main/frontend/silk-widgets/README.md Hi friends, is there some guidance available on how to add Kobweb into an existing Compose HTML project? I'd like to explore the possibility of using Kobweb to create Google Chrome Extensions. I know it's possible with Compose HTML and Kobweb is based upon it, so was wondering if someone has already tried doing this?
s
yes, using kobweb for chrome extensions is possible but there are a few quirks. that link is a good start
will your extension be running as a extension popup or also as a content script?
s
As a popup (not sure about the other one, don't know about it)
s
content script means running js alongside the website itself, so you can for example modify parts of the original html
s
Understood, popup only in that case 👍
s
when using kobweb-core the router will crash and 404 because the popup doesn't have a
location
, one way to fix that is via an error handler
Copy code
@InitKobweb
fun initKobweb(ctx: InitKobwebContext) {
    ctx.router.setErrorHandler {
        YourApp()
    }
}
the other way is by using silk-widgets only which requires a bit of manual setup mentioned in the link you found
s
Understood, thanks a bunch 🙌