You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am going to use the citation.js to write an extension. First, I tried to write a sample html and use the demo displayed in https://citation.js.org/. Here is the code:
<!DOCTYPE html>
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/citation-js" type="text/javascript"></script>
</head>
<body>
<h1>TEST</h1>
<script>
const Cite = require('citation-js')
let example = new Cite('Q21972834')
let output = example.format('bibliography', {
format: 'html',
template: 'apa',
lang: 'en-US'
})
console.log(output)
</script>
</body>
</html>
In the console, I get the following error:
citation-js:1 Uncaught TypeError: Failed to construct 'Response': Please use the 'new' operator, this DOM object constructor cannot be called as a function.
at new w (citation-js:1)
at b (citation-js:1)
at i (citation-js:1)
at Array.map (<anonymous>)
at Object.a (citation-js:1)
at m (citation-js:1)
at y (citation-js:1)
at p.s [as add] (citation-js:1)
at p [as set] (citation-js:1)
at new p (citation-js:1)
Please help
The text was updated successfully, but these errors were encountered:
I am going to use the citation.js to write an extension. First, I tried to write a sample html and use the demo displayed in https://citation.js.org/. Here is the code:
In the console, I get the following error:
Please help
The text was updated successfully, but these errors were encountered: