{"record":{"id":"b375164a82e9c9df","repo":"DioxusLabs/dioxus","slug":"todo-convert-visible-data-in-dioxus-native-requi","errorCode":null,"errorMessage":"todo: convert_visible_data in dioxus-native. requires support in blitz","messagePattern":"todo: convert_visible_data in dioxus-native\\. requires support in blitz","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/native-dom/src/events.rs","lineNumber":138,"sourceCode":"\n    fn convert_touch_data(&self, event: &PlatformEventData) -> TouchData {\n        event.downcast::<NativeTouchData>().unwrap().clone().into()\n    }\n\n    fn convert_transition_data(&self, _event: &PlatformEventData) -> TransitionData {\n        unimplemented!(\"todo: convert_transition_data in dioxus-native. requires support in blitz\")\n    }\n\n    fn convert_wheel_data(&self, event: &PlatformEventData) -> WheelData {\n        event.downcast::<NativeWheelData>().unwrap().clone().into()\n    }\n\n    fn convert_resize_data(&self, _event: &PlatformEventData) -> ResizeData {\n        unimplemented!(\"todo: convert_resize_data in dioxus-native. requires support in blitz\")\n    }\n\n    fn convert_visible_data(&self, _event: &PlatformEventData) -> VisibleData {\n        unimplemented!(\"todo: convert_visible_data in dioxus-native. requires support in blitz\")\n    }\n}\n\n#[derive(Clone)]\npub struct NodeHandle {\n    pub(crate) doc: Rc<RefCell<BaseDocument>>,\n    pub(crate) node_id: NodeId,\n}\n\nimpl NodeHandle {\n    pub fn node_id(&self) -> NodeId {\n        self.node_id\n    }\n\n    pub fn doc(&self) -> Ref<'_, BaseDocument> {\n        self.doc.borrow()\n    }\n","sourceCodeStart":120,"sourceCodeEnd":156,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/393d190a801ccb441d41923e232289b4f8a5c669/packages/native-dom/src/events.rs#L120-L156","documentation":"Like the other event stubs in dioxus-native, convert_visible_data is an unimplemented!() placeholder: blitz does not yet emit visibility events, so the converter cannot produce VisibleData. If a visibility event reaches the VirtualDOM under the native renderer, this panic fires during event conversion.","triggerScenarios":"Using the onvisible event handler (IntersectionObserver-style visibility callbacks) in an app rendered by dioxus-native; the conversion from PlatformEventData to VisibleData hits the stub.","commonSituations":"Copying web code that uses onvisible for lazy loading or scroll-reveal into a native (blitz) app; upgrading a project to a renderer configuration that routes visibility events through NativeConverter.","solutions":["Remove or cfg-gate the onvisible handler when targeting dioxus-native","Approximate visibility with scroll events (convert_scroll_data is implemented) or element geometry via NodeHandle","Run that part of the UI on the web or desktop renderer where visibility events work","Upgrade dioxus-native once blitz implements visibility events and the converter stops being a stub"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"fn supports_visibility_events() -> bool {\n    cfg!(any(target_arch = \"wasm32\", feature = \"desktop\")) // not supported on dioxus-native\n}","typeGuard":"fn supports_visibility_events() -> bool {\n    cfg!(any(target_arch = \"wasm32\", feature = \"desktop\"))\n}","tryCatchPattern":null,"preventionTips":["Do not use onvisible in code that must run under dioxus-native","Gate visibility handlers with #[cfg(...)] per renderer","Use scroll events (implemented in the native converter) as an approximation where acceptable"],"tags":["native","blitz","events","visibility","panic"],"backgroundTag":null,"analyzedSha":"393d190a801ccb441d41923e232289b4f8a5c669","analyzedAt":"2026-08-16T11:27:45.815Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}