Yeah that should be fine, though I don't think it needs to be wrapped in the event handler since inline JS is already auto-wrapped in a DOMContentLoaded handler. If the my-disabler handler is used sparingly/predictably, I'd recommend just using loading the base handler and the extension via <xf:js> instead.