nl_tokens: Prompt a user to save the given packets as a file by injecting an <a > element ( with display : none styling ) into the page and calling the element’s click () method . The element is removed immediately after .
pl_tokens: function save_to_disk ( packets , name ) { var blob = new Blob ( packets ) ; var url = URL . createObjectURL ( blob ) ; var el = document . createElement ( "a" ) ; el . style . display = "none" ; el . href = <mask> ; el . download = name ; document . body . appendChild ( el ) ; //It seems like a security problem that this actually works; //I’d think there would need to be some confirmation before //a browser could save arbitrarily many bytes onto the disk. //But, hey. el . click ( ) ; document . body . removeChild ( el ) ; }