1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 div_log = function (message) {
6 // console.log() does not work inside the isolated world.
7 // Add DOM elements to show error messages.
8 var div = document.getElementById('log');
9 var element = document.createElement('pre');
10 element.innerText = message;
11 div.appendChild(element);
13 if (typeof world != 'undefined') {
14 div_log('v8 isolation doesn\'t work');
15 document.title = 'FAIL';
17 div_log('The first script pseudo_main.js is loaded');
18 div_log('Loading the second script pseudo_element_main.js ...');
19 cr.googleTranslate.onLoadJavascript(element_main_script_url);