Is it possible to configure the Google Chrome console to format html output. Therefore if i will
html
console.log('<ul><li>1</li><li>2</li></ul>');
It will show real instat html markup list
No, this is not possible. The Google Chrome API Console link does not mention this.
However, you can create a debugging div tag and add the following to it:
div
<div id='debug'></div>
and
document.getElementById('debug').innerHTML = '<ul><li>1</li><li>2</li></ul>';
A simple hack might be something like this:
console.html = function(data){ var self = this; for(var i=0; i< arguments.length;i++){ var wrapper= document.createElement('wrapper'); wrapper.innerHTML = arguments[i]; self.log(wrapper) } }
Yes,
you can show the list using
console.log("hi",[1,2,3,4],"ho");
( , important, + converts the array to String.
,
+
No, plain html is not possible.
Source: https://habr.com/ru/post/1492668/More articles:EF migrating pattern - where is it? - migrationImport and Export Indexeddb Data - indexeddbSupported Symfony2 NoSQL Databases? - nosql"gift" Android application for Android - javarandomseed in LUA - randomAn empty ad in css causes IE8 error - cssDerived Pointer to a Derived Object - c ++Validating Struts 2 with annotation - javaA signed exported Android application, crashing with the apache.commons.logging class, cannot be converted to 'aaaac' - androidHow can I exclude external .jar from obfuscation Proguard (Android project)? - androidAll Articles