D
D
Dmitri19982022-01-04 01:45:56
Node.js
Dmitri1998, 2022-01-04 01:45:56

How to pass a function through a module that has a request to the DOM?

I have a code file

const getTitle = function() {
return {title: document.title}
}
exports.getTitle = getTitle


Gives an error that it is documentnot found
And I need to call it in another file to get the page title

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question