I should probably make this easier to do. I typically use dialogs to achieve this effect, which you can see in the demo at the link, along with the relevant source code. If you don't want to do that, here's a messier way:
You have:
<span class='auto-update' data-macro='<<linkedinventory "Drop" "$inventory" "$floor">>'>\
<<linkedinventory "Drop" "$inventory" "$floor">>\
</span>
On the floor is:
<span class='auto-update' data-macro='<<linkedinventory "Get" "$floor" "$inventory">>'>\
<<linkedinventory "Get" "$floor" "$inventory">>\
</span>
Then in JavaScript:
$(document).on(':inventory-update', function (ev) {
$('.auto-update').each( function (i, el) {
var $el = $(el);
var content = $el.attr('data-macro');
$el.empty().wiki(content);
});
});
I'll work on getting enough data into the macro's wrapper so that users will be able to easily recreate the call via an event without essentially needing to write the call twice.