I defined keywords for the JavaScript programming language and HTML.
I have read that it is possible to use the keywords of both languages in a \listings code snippet. But in my example, the JavaScript keywords are not shown in blue.

Here is my code example. Is my use of alsolanguage incorrect?
Code:
\documentclass{scrreprt}
\usepackage{color}
\usepackage{upquote}
\usepackage{listings}
\makeatletter
\lstdefinelanguage{JavaScript}{
keywords={var, function}
}
\lstdefinelanguage{HTML5}{
language=HTML,
sensitive=true,
tagstyle=\color{blue}\bfseries,
usekeywordsintag=true
}
\lstset{%
% Basic design
basicstyle={\small\ttfamily},
% Code design
keywordstyle=\color{blue}\bfseries,
% Code
language=HTML5,
tabsize=2,
showtabs=false,
showspaces=false,
showstringspaces=false,
extendedchars=true,
breaklines=true
}
\makeatother
\begin{document}
\begin{lstlisting}[language=HTML5,alsolanguage=JavaScript]
<!DOCTYPE html>
<html>
<head>
<title>Canvas-Rotation</title>
<meta charset="UTF-8" />
</head>
<body>
<canvas id="square" width="200" height="200"></canvas>
<script>
var canvas = document.createElement('canvas');
canvas.width = 200;
canvas.height = 200;
var image = new Image();
image.src = 'images/card.png';
image.width = 114;
image.height = 158;
image.onload = window.setInterval(function() {
rotation();
}, 1000/60);
</script>
</body>
</html>
\end{lstlisting}
\end{document}
