GLib.main_current_source

function main_current_source(): GLib.Source {
    // Gjs wrapper for g_main_current_source()
}
  

Returns the currently firing source for this thread.

Since 2.12

Returns

The currently firing source or null.