- let show_in_show_window_callback mmlwidget (n : Gdome.element) _ =
- if n#hasAttributeNS ~namespaceURI:xlinkns ~localName:href then
- let uri =
- (n#getAttributeNS ~namespaceURI:xlinkns ~localName:href)#to_string
- in
- show_in_show_window_uri (UriManager.uri_of_string uri)
- else
- ignore (mmlwidget#action_toggle n)
+ let show_in_show_window_callback mmlwidget (n : Gdome.element option) _ =
+ match n with
+ None -> ()
+ | Some n' ->
+ if n'#hasAttributeNS ~namespaceURI:xlinkns ~localName:href then
+ let uri =
+ (n'#getAttributeNS ~namespaceURI:xlinkns ~localName:href)#to_string
+ in
+ show_in_show_window_uri (UriManager.uri_of_string uri)
+ else
+ ignore (mmlwidget#action_toggle n')