Created
July 23, 2019 13:21
-
-
Save hyrious/316dd44ae6f6acea58190c0c6b28866c to your computer and use it in GitHub Desktop.
hack your mainloop in Midori.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# require 'midori.rb' | |
$mainloop = nil | |
def mainloop &blk | |
$mainloop = blk | |
end | |
class << EventLoop | |
alias _timer_once_mainloop timer_once | |
def timer_once | |
_timer_once_mainloop | |
$mainloop.call if $mainloop | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment