The LearningSampleGadget for Finesse 10.0 shows using:
$("#dnis").text(dialog.getMediaProperties().DNIS);
Appears the javascript library documentation is incorrect you have to get dnis from the MediaProperties.
This works for me I see the DNIS displayed in the SampleGadget_Final gadget.