Let's use navigator.mozNfc instead of window.navigator.mozNfc, it's the same but shorter, and above you already used navigator.mozNfc.