V
V
vasIvas2015-07-03 23:07:36
JavaScript
vasIvas, 2015-07-03 23:07:36

How to access browser api from js?

(function app(window){
  window.console = null;

})(window);
// как в ткой ситуации снова запустить консоль из js?
// или как ещё можно получить доступ к api консоли браузера FF, чтобы вывести в нее сообщение?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Petrov, 2015-07-04
@vasIvas

If on the forehead, then create a new context and take it from it.

window.console = null;
var iframe = document.createElement('iframe');
iframe.style.display = 'none';
document.body.appendChild(iframe);
window.console = iframe.contentWindow.console;
console.log('Я снова с вами');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question