wxWebViewEvent(3)

πŸ“¦
version 29.0.6 Β· 3 versions
, in ubuntu stonking

✨ NAME ✨

wxWebViewEvent β€” the navigation event bestie that carries all the tea about what's happening inside your wxWebView objects πŸ¦‹


πŸ’… DESCRIPTION πŸ’…

okay so, real talk: this class is derived, which means it can use functions from its whole little ancestry line, no cap. It inherits from:

  • wxNotifyEvent
  • wxCommandEvent
  • wxEvent

wxWidgets docs: wxWebViewEvent πŸ“š

πŸŽ€ Events πŸŽ€

wanna get notified when stuff goes down? hook it up by calling wxEvtHandler:connect/3 together with wxWebViewEventType, and boom β€” you're subscribed to events of this type. slay ✨


🌸 DATA TYPES 🌸

  • wxWebView() :: #wxWebView{}. β€” the record itself, iconic πŸ’–
  • wxWebViewEvent() :: wx:wx_object(). β€” the event object, it's giving main character energy πŸ‘‘
  • wxWebViewEventType() :: webview_navigating | webview_navigated | webview_loaded | webview_error | webview_newwindow | webview_title_changed. β€” the full vibe check menu of event types 🌈

πŸ”₯ FUNCTIONS πŸ”₯

πŸ’œ getInt

getInt(This) -> integer() when This :: wxWebViewEvent().

Returns the integer identifier that goes with a listbox, choice or radiobox selection β€” but only if the event was an actual selection, not a deselection, okay? 🫢 Or it hands you back a boolean representing the value of a checkbox.

And for a menu item specifically: this method returns -1 if the item is not checkable, or a boolean value (true or false) for checkable items, telling you the new state of the item. periodt πŸ’…


πŸ“ getString

getString(This) -> unicode:charlist()
                    when This :: wxWebViewEvent().

Returns the item string for a listbox or choice selection event. cute! πŸ’–

Now pay attention bestie: if one or several items have been deselected, it returns the index of the first deselected item. And if some items have been selected and others deselected at the same time? It returns the index of the first selected item. got it? got it. ✨


🧚 getTarget

getTarget(This) -> unicode:charlist()
                    when This :: wxWebViewEvent().

Get the name of the target frame that the url of this event has been loaded into, or will be loaded into 🌸

heads up: this may return an empty string if the frame is not available. no frame, no name, that's just how it is 😭

🌟 getURL

getURL(This) -> unicode:charlist() when This :: wxWebViewEvent().

Get the URL being visited. that's it, that's the function, lowkey perfect 🌈


and that's the whole page bestie, you ate it πŸ’…βœ¨πŸ¦‹

sending you off with love from Ericsson AB, straight outta wx 2.6 πŸŽ€ β€” this page is wxWebViewEvent(3), stay iconic πŸ‘‘

πŸ“¦ where this page comes from