Hello,
I have a proof of concept embeddable widget working with Stimulus, locally. I’m running into an issue and hitting the limit of my understanding and hope I can explain/provide the proper information for some guidance on ways to begin debugging this.
The widget is being bootstrapped properly (template and css load), Stimulus application and controller are loading correctly, the only thing that seems to be unable to work on an external domain is firing of data-action’s. There is a button on the widget that won’t fire. I can initialize and emit a normal JavaScript event. Console logging on initialize and connect also emit a log.
Any other information you may need just ask.
The embeddable widget.js on client page looks something like this:
import { Application } from "stimulus";
import MyController from "../../javascript/controllers/widgets/my_controller";
const application = Application.start();
application.register("widgets--my", MyController);
// Creates and appends a stylesheet in Head
bootstrapCss();