Re: Event listener when loading is done
Posted: 30 August 2020, 03:09
FYI, remember there are TWO preference controls on game page -- one in the top-right menu, one at the bottom on the "Options" tab. The latter have IDs like "preference_fontrol_200", which this code wouldn't catch.Draasill wrote: ↑11 June 2020, 13:48 Hoping that it may help others, or that this kind of "polyfill" would be natively in the framework one day, here is how I listen to preferences changes, or set them programmatically :Code: Select all
... initPreferencesObserver: function() { dojo.query('.preference_control').on( 'change', dojo.hitch(this, function(e) { var match = e.target.id.match(/^preference_control_(\d+)$/) ...