When a user edits some data on a Wikidata item, the page is not reloaded, but its content changes to reflect the new values. Therefore, the script which makes this edit should fire the hook "wikipage.content"¹ so that gadgets which use the content can be notified about this. In particular, I would like
https://www.mediawiki.org/wiki/Snippets/Last_revision_action
to work on Wikidata.
As an example, the live preview feature from MediaWiki itself fires this hook:
https://github.com/wikimedia/mediawiki/blob/558b28003fc234f9c7ab3dfd83c8364f4e7260bc/resources/src/mediawiki/page/startup.js#L31
¹ https://doc.wikimedia.org/mediawiki-core/master/js/#!/api/mw.hook-event-wikipage_content