Implement xp-framework/rfc#289 with PR #40