When the browser already provides the "cloudeebus" module, then the
examples do not need (and shouldn't) import the cloudeebus .js again,
because that would replace the browser extension implementation with
the web socket version.
<!DOCTYPE html>
<html>
<head>
- <script src="../../lib/autobahn.min.js"></script>
- <script src="../../cloudeebus/cloudeebus.js"></script>
+ <!-- Do not load autobahn or cloudeebus if already provided by Crosswalk browser extensions. -->
+ <script type="text/javascript">
+ typeof cloudeebus != 'undefined' ||
+ document.write(unescape('%3Cscript src=%27../../lib/autobahn.min.js%27%3E %3C/script%3E %3Cscript src=%27../../cloudeebus/cloudeebus.js%27%3E%3C/script%3E'));
+ </script>
<script type="text/javascript">
function evalScript() {
eval(
<!DOCTYPE html>
<html>
<head>
- <script src="../../lib/autobahn.min.js"></script>
- <script src="../../cloudeebus/cloudeebus.js"></script>
+ <!-- Do not load autobahn or cloudeebus if already provided by Crosswalk browser extensions. -->
+ <!-- script type="text/javascript">
+ typeof cloudeebus != 'undefined' ||
+ document.write(unescape('%3Cscript src=%27../../lib/autobahn.min.js%27%3E %3C/script%3E %3Cscript src=%27../../cloudeebus/cloudeebus.js%27%3E%3C/script%3E'));
+ </script -->
<script type="text/javascript">
function evalScript(field) {
eval(
<!DOCTYPE html>
<html>
<head>
- <script src="../../lib/autobahn.min.js"></script>
- <script src="../../cloudeebus/cloudeebus.js"></script>
+ <!-- Do not load autobahn or cloudeebus if already provided by Crosswalk browser extensions. -->
+ <script type="text/javascript">
+ typeof cloudeebus != 'undefined' ||
+ document.write(unescape('%3Cscript src=%27../../lib/autobahn.min.js%27%3E %3C/script%3E %3Cscript src=%27../../cloudeebus/cloudeebus.js%27%3E%3C/script%3E'));
+ </script>
<script type="text/javascript">
function evalScript() {
eval(