-

   rss_rss_hh_new

 - e-mail

 

 -

 LiveInternet.ru:
: 17.03.2011
:
:
: 51

:


Chrome DevTools

, 19 2017 . 10:03 +
SSul 10:03

Chrome DevTools

  • Tutorial
, , Chrome DevTools.

.


1. .


DevTools .
image

2.


, , , . material design.
image

3.


, , . ! document.designMode = 'on', document.body.contentEditable = true. .
image

4.


, . Computed , , font-family.
image

5.


DevTools , CSS, :hover :focus , . CSS.
image

6.


Shift + , : rgb, hsl hex.
image

7. .


DevTools (, animation-timing-function CSS ).
image

.


1. HTML JS


HTML, DOM-. JS , console.dir().
image

2.


. console.group(), console.groupCollapsed() console.groupEnd().
function name(obj) {
  console.group('name');
  console.log('first: ', obj.first);
  console.log('middle: ', obj.middle);
  console.log('last: ', obj.last);
  console.groupEnd();
}
name({"first":"Wile","middle":"E","last":"Coyote"});

image

3.1.


, . console.table().
function Person(firstName, lastName) {
  this.firstName = firstName;
  this.lastName = lastName;
}
var family = {};
family.mother = new Person("Jane", "Smith");
family.father = new Person("John", "Smith");
family.daughter = new Person("Emily", "Smith");
console.table(family);

image

3.2 keys(object) values(object)


Keys() .
Values() , .
image

4.


, . ? console.time() console.timeEnd().
image

5.


, , .
console.profile();
// Some code to execute
console.profileEnd();

image

6.1. $(selector)


jQuery, $(.class) $(#id). . $ jQuery , , . document.querySelector(), DOM CSS-. , jQuery, $ .

6.2. $$(selector)


, . document.querySelectorAll().
image

7. clear(), copy(object) inspect(object/function)


Clear() .
Copy() .
Inspect() : Elements Profiles.

.


1.


( DevTools Google Chrome!)
( ) , :
  • ( ).
  • ( ).
  • .

image

2.


Chrome . Sources.
image

3. shadow DOM


, , . , Settings -> General Show user agent shadow DOM, Elements. .
image

4.


DOM, CSS, Network .. , , , . . , , . Ctrl + F.
image

5. Come to the Dark Side


(:
, , , . DevTools.
image

:
developers.google.com/web/tools/chrome-devtools
habrahabr.ru
Original source: habrahabr.ru (comments, light).

https://habrahabr.ru/post/336710/

:  

: [1] []
 

:
: 

: ( )

:

  URL