That makes the event handlers not serializable. Why not use `addScript`?