not work chrome console

How can i simulate click to make move with mouse in website


It only works on some elements, but not in game board

Chrome extension: download text file in the latest version of Chrome

I’m a newbie of Chrome extension development. I’m working on a project which needs to generate a text file for user to download. With the help of experts in the Internet, I’m using a function like this:

function saveText(filename, text) {
    var tempElem = document.createElement('a');
    tempElem.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text));
    tempElem.setAttribute('download', filename);;

This function works perfect before. But when the Chrome was updated today, it no longer works – no prompt in the background console, the scripts work fine before and after this function. I’ve tried all the method, but cannot find why.

Any suggestions or hints will be appreciated. Thanks a lot!