简体   繁体   中英

Firebase 3.6.2 Web SDK missing “use strict”

I was trying to get a web app up and running and followed a very straightforward tutorial from Firebase. The link is pasted as a comment below.

The webpage, upon being loaded in Google Chrome, does not behave according to the tutorial. You are supposed to be able to change the value at a location specified at the child node "text" of my Firebase database and the webpage ought to update the text of a to reflect the change of the database. It doesn't. Dreamweaver tells me I'm forgetting the "use strict"; line in Firebase.js

I was wondering if anybody had any idea why this was? I imagine I'm making an obvious mistake somewhere.

I've also included screenshots of the error and my source code. I appreciate any help!

Thanks!

error from Firebase.js Firebase.js中的错误

my source code 我的源代码

Dreamweaver runs a linter on all code and the 'use strict' warning is a red herring for your problem. Code without 'use strict' isn't going to break anything so ignore it. If you find the warning distracting, you can disable it in Dreamweaver.

Anyway, if something isn't working in your app, you should be checking for errors in your browser's console log.

If your screenshot contains the entirety of your code, your problem might be that you're trying to set the innerText of a non-existent element, bigOne . This would present in the console as an error like "cannot set property innerText of undefined".

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM