Changes between Version 25 and Version 26 of Web Inspector


Ignore:
Timestamp:
Nov 17, 2009 11:27:17 AM (11 years ago)
Author:
timothy@apple.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Web Inspector

    v25 v26  
    1 = Web Inspector =
    2 The Web Inspector allows you to view the page source, live DOM hierarchy, script debugging, profiling and more!
    3 
    4 == Enabling Web Inspector ==
    5 
    6  * Safari — Enable the Develop menu option in the Advanced preferences. Use the optional toolbar button, Develop menu or Inspect Element context menu to access to Web Inspector.
    7 
    8  * Google Chrome — Enabled by default, use the Inspect Element context menu to access to Web Inspector.
    9 
    10  * Any WebKit client —  Find the application's bundle identifier. Enter the following command once in Terminal, inserting the bundle identifier, and relaunch the application in order to use the Web Inspector.
    11 {{{
    12 defaults write «bundle-identifier-here» WebKitDeveloperExtras -bool true
    13 }}}
    14 
    15 == Using the Web Inspector ==
    16 The Web Inspector can be opened by '''right clicking anywhere on a web page''' and choosing '''Inspect Element'''.  Once open, it highlights the node on the page as it is selected in the hierarchy. You can also search for nodes by node name, id and CSS class name.
    17 
    18 
    19 One of the unique features of the inspector is the ability to root the DOM hierarchy by double clicking a node to dig deeper. This lets you easily manage large nested pages and only focus on a particular sub-tree with minimal indentation.
    20 
    21 
    22 The Node pane shows the current node type and name, as well as any element attributes.
    23 
    24 
    25 Under the Style pane we show all the CSS rules that apply to the focused node. These rules are listed in cascade order with overridden properties striked-out—letting you truly see how cascading stylesheets affect the page layout. All shorthand properties have a disclosure-triangle to show and hide the expanded properties created by the shorthand.
    26 
    27 
    28 The Metrics pane provides a quick visual look at how margins, borders and padding affect the current node.
    29 
    30 
    31 Various HTML and JavaScript properties, including length of text nodes, offsetWidth/Height, class names, and parent/sibling information are vieweable in the Properties pane.
    32 
    33 
    34 See [http://developer.apple.com/safari/library/documentation/AppleApplications/Conceptual/Safari_Developer_Guide/UsingtheWebInspector/UsingtheWebInspector.html Safari User Guide for Web Developers] for more details on other panels of the Web Inspector.
    35 
    36 == Hacking on the Web Inspector ==
    37 Most of the Web Inspector's code is HTML, JavaScript, and CSS, so it's very easy to implement new features and fix bugs! Click here to see a [http://tinyurl.com/2vqypl list of Web Inspector bugs and feature requests].
    38 
    39 == Related Blog Posts ==
    40 [http://webkit.org/blog/829/web-inspector-updates/ Web Inspector Updates][[BR]]
    41 [http://www.alertdebugging.com/2009/04/29/building-a-better-javascript-profiler-with-webkit/ Building a Better JavaScript Profiler with WebKit][[BR]]
    42 [http://webkit.org/blog/197/web-inspector-redesign Web Inspector Redesign][[BR]]
    43 [http://webkit.org/blog/108/yet-another-one-more-thing-a-new-web-inspector Yet another one more thing… a new Web Inspector!][[BR]]
    44 [http://webkit.org/blog/41/introducing-the-web-inspector Introducing the Web Inspector]
    45 
    46 == Shortcut Keys ==
    47 
    48 === Safari ===
    49 || Show Web Inspector                   || ⌥⌘I ||
    50 || Show Error Console                   || ⌥⌘C ||
    51 || Start Profiling Javascript           || ⌥⇧⌘P ||
    52 === Web Inspector ===
    53 || Next Panel                           || ⌘] ||
    54 || Previous Panel                       || ⌘[ ||
    55 || Toggle Console                       || Esc ||
    56 || Focus Search Box                     || ⌘F ||
    57 || Find Next                            || ⌘G ||
    58 || Find Previous                        || ⇧⌘G ||
    59 === Console ===
    60 || Next Suggestion                      || Tab ||
    61 || Previous Suggestion                  || ⇧Tab ||
    62 || Accept Suggestion                    || Right ||
    63 || Execute                              || Return ||
    64 === Elements Panel ===
    65 || Navigate                             || Up/Down ||
    66 || Expand/Collapse Node                 || Right/Left ||
    67 || Expand Node                          || Double-Click on tag ||
    68 || Edit Attribute                      || Return or Double-Click on attribute ||
    69 === Styles Pane ===
    70 || Edit Rule                            || Double-Click ||
    71 || Edit Next/Previous Property          || Tab/⇧Tab ||
    72 || Insert New Property                  || Double-Click on whitespace ||
    73 || Increment/Decrement Value            || Up/Down ||
    74 || Increment/Decrement Value by 10      || ⇧Up/⇧Down ||
    75 || Increment/Decrement Value by 10      || PageUp/PageDown ||
    76 || Increment/Decrement Value by 100      || ⇧PageUp/⇧PageDown ||
    77 || Increment/Decrement Value by 0.1     || ⌥Up/⌥Down ||
    78 === Debugger ===
    79 || Select Next Call Frame               || ⌃. ||
    80 || Select Previous Call Frame           || ⌃, ||
    81 || Continue                             || F8 or ⌘/ ||
    82 || Step Over                            || F10 or ⌘' ||
    83 || Step Into                            || F11 or ⌘; ||
    84 || Step Out                             || ⇧F11 or ⇧⌘; ||
    85 || Evaluate Selection                   || ⇧⌘E ||
    86 || Toggle Breakpoint Condition          || Click on line number ||
    87 || Edit Breakpoint Condition            || Right-Click on line number ||
    88 
     1Moved to WebInspector.