|e: Event| { let target = e.target().unwrap().dyn_into::<HtmlInputElement>().unwrap(); let color = target.value(); state.borrow_mut().set_color(color) }) as Box<dyn FnMut(_)>); input.add_event_listener_with_callback("change", picked_color.as_ref().unchecked_ref())?; picked_color.forget(); //⚠注意点