Using HTML5/JavaScript to generate and save a file

后端 未结 17 2032
有刺的猬
有刺的猬 2020-11-21 07:30

I\'ve been fiddling with WebGL lately, and have gotten a Collada reader working. Problem is it\'s pretty slow (Collada is a very verbose format), so I\'m going to start conv

17条回答
  •  没有蜡笔的小新
    2020-11-21 08:05

    I found two simple approaches that work for me. First, using an already clicked a element and injecting the download data. And second, generating an a element with the download data, executing a.click() and removing it again. But the second approach works only if invoked by a user click action as well. (Some) Browser block click() from other contexts like on loading or triggered after a timeout (setTimeout).

    
    
      
        
        
       
      
        download
        
      
    
    

提交回复
热议问题