<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Web Inspector: Improve TypedArray view in console - show non-index properties (buffer)"
   href="https://bugs.webkit.org/show_bug.cgi?id=145190">145190</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Web Inspector: Improve TypedArray view in console - show non-index properties (buffer)
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>528+ (Nightly build)
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Web Inspector
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>joepeck&#64;webkit.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>graouts&#64;webkit.org, joepeck&#64;webkit.org, jonowells&#64;apple.com, mattbaker&#64;apple.com, nvasilyev&#64;apple.com, timothy&#64;apple.com, webkit-bug-importer&#64;group.apple.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>* SUMMARY
Improve TypedArray view in console - show non-index properties (buffer, byteLength, byteOffset).

* TEST
var buffer = new ArrayBuffer(12);
var dataView = new DataView(buffer);
var int8View = new Int8Array(buffer);
console.log(buffer);
console.log(dataView);
console.log(int8View); // &lt;---

We treat the TypedArrays, like Int8Array here, as arrays.

In previews we may ignore non-index properties. But even when expanding (console.dir(int8View)) we only show the indices and don't show the buffer/byteLength/byteOffset value properties which may be useful.


* NOTES
- InjectedScriptSource.js possible changes to mark as non-lossy.

    // For arrays, only allow indexes. Mark as lossy if there are non-obvious value properties.
    if (this.subtype === &quot;array&quot; &amp;&amp; !isUInt32(name)) {
        if (name !== &quot;length&quot; &amp;&amp; name !== &quot;constructor&quot; &amp;&amp; descriptor.isOwn &amp;&amp; !descriptor.symbol &amp;&amp; &quot;value&quot; in descriptor &amp;&amp; typeof descriptor.value !== &quot;function&quot;)
            preview.lossless = false;
        continue;
    }

- Would still require frontend changes for an ObjectTree for &quot;array&quot; subtype to also show non-index properties. Perhaps in a new section beneath the #s, but before the Prototype.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>