Skip to content

Instantly share code, notes, and snippets.

@petebrowne
Created December 22, 2010 21:29
Show Gist options
  • Save petebrowne/752136 to your computer and use it in GitHub Desktop.
Save petebrowne/752136 to your computer and use it in GitHub Desktop.
Head.js Opera 11.0 Loading Bug
<!-- Works in Opera 11.0 -->
<html>
<head>
<script src="head.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<script>
head.js("script1.js");
head.ready(function() {
alert('READY!');
});
</script>
</body>
</html>
<!-- Also Works in Opera 11.0 -->
<html>
<head>
<script src="head.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<script>
head.js("script1.js");
head.js("script2.js");
head.ready(function() {
alert('READY!');
});
</script>
</body>
</html>
<!-- Does not work in Opera 11.0 -->
<html>
<head>
<script src="head.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<script>
head.js("script1.js", "script2.js");
head.ready(function() {
alert('READY!');
});
</script>
</body>
</html>
@Eroan
Copy link

Eroan commented Jul 14, 2011

Hi,

I confirm that the problem still exists. I changed the script as you did and it "fixed" the bug.

@awvalenti
Copy link

Same happened to me. My case is similar to the one, except my function was the last argument for the head.js() function (I wasn't calling head.ready() ).

I changed the script as you explained too and it solved the problem. I'm using Opera 11.50 and Windows 7.

Strangely enough, the app does work if Opera Dragonfly is on, and it doesn't if it's off...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment