作者:桃Z夭夭 | 来源:互联网 | 2023-05-17 02:39
ImtryingtoloadFirebaseinsidemychromeextensionscontentscript:我正在尝试在Chrome扩展程序的内容脚本中加载Fir
I'm trying to load Firebase inside my chrome extension's content script:
我正在尝试在Chrome扩展程序的内容脚本中加载Firebase:
var script = document.createElement("script")
script.type = "text/Javascript"
script.src = "https://cdn.firebase.com/js/client/1.1.2/firebase.js"
document.body.appendChild(script)
firebaseUrl = 'https://foobar.firebaseio.com'
root = new Firebase(firebaseUrl)
But I get the error message:
但我收到错误消息:
Uncaught ReferenceError: Firebase is not defined
What am I doing wrong?
我究竟做错了什么?
1 个解决方案