Reto Höhener
Reto Höhener

Reputation: 5838

Javascript statement after facebook sdk is never executed

I have this test to load the Facebook JavaScript SDK synchronously:

<html>
<body>
  <script>alert('1');</script>     
  <script src="https://connect.facebook.net/en_US/all.js" />
  <script>alert('2');</script>
</body>
</html>

For me, the second alert is never shown, any ideas why?

Upvotes: 0

Views: 23

Answers (1)

andyrandy
andyrandy

Reputation: 74014

Correction:

<html>
<body>
  <script>alert('1');</script>     
  <script src="https://connect.facebook.net/en_US/all.js"></script>
  <script>alert('2');</script>
</body>
</html>

More information: Why don't self-closing script tags work?

Upvotes: 2

Related Questions