Switch to pure JS