NXP-15645/NXP-15346: follow changes on onClosed js function management