Modify csv filename?

Modify csv filename?

craighcraigh Posts: 17Questions: 6Answers: 1

Is it possible to modify the filename that is used when * is replaced by title tag?

The docs say

The special character * is automatically replaced with the value read from the host document's title tag

So in the callback can I access this value?

something like this? (I know this doesn't work)

filename: function () {
    let title = '*';
    return title.toLowerCase().replace(/ /g, '-') + '-' + new Date().toISOString();
}

or some other way?

This question has an accepted answers - jump to answer

Answers

  • craighcraigh Posts: 17Questions: 6Answers: 1
    Answer ✓

    nevermind :#

            return document.title.toLowerCase().replace(/ /g, '-') + '-' + new Date().toISOString();
    
Sign In or Register to comment.