Reputation: 4341
A simple chrome extension that replaces the new tab
"permissions": ["activeTab"]
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>_</title>
<script src="test.js"></script>
</head>
<body>
<div id="image"></div>
</body>
</html>
let test = () => {
console.log(document.getElementById('imagen'))
}
chrome.tabs.query({active: true}, test)
chrome.tags.getCurrent(test)
These instructions should be equivalent (?)
Upvotes: 0
Views: 55
Reputation: 403
I'm quite positive that it's because you're calling chrome.tags instead of chrome.tabs.
The documentation is also very clear that it won't work on background or popup pages but from your example I don't believe this is the case.
Upvotes: 2