-
Notifications
You must be signed in to change notification settings - Fork 280
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: improve display of HTML in the debugger
Advertises ANSI styles as proposed in microsoft/debug-adapter-protocol#500, though it works without them too, just without colors! Previously the Nodes were displayed as naive objects, so we'd just list their properties, which was quite useless when trying to get a handle on the DOM. Now we display their children as the primary element display, and have "Node Attributes" in a separate section. ![](https://memes.peet.io/img/24-09-9b2b35e1-3874-4e06-825a-5c84abeeb6e4.png) Refs microsoft/vscode#227729
- Loading branch information
1 parent
9419f57
commit 85c9047
Showing
19 changed files
with
286 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/*--------------------------------------------------------- | ||
* Copyright (C) Microsoft Corporation. All rights reserved. | ||
*--------------------------------------------------------*/ | ||
|
||
import { injectable } from 'inversify'; | ||
import Dap from '../dap/api'; | ||
|
||
export interface IClientCapabilies { | ||
value?: Dap.InitializeParams; | ||
} | ||
|
||
export const IClientCapabilies = Symbol('IClientCapabilies'); | ||
|
||
@injectable() | ||
export class ClientCapabilities implements IClientCapabilies { | ||
value?: Dap.InitializeParams | undefined; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/*--------------------------------------------------------- | ||
* Copyright (C) Microsoft Corporation. All rights reserved. | ||
*--------------------------------------------------------*/ | ||
|
||
import { remoteFunction } from '.'; | ||
|
||
/** | ||
* Returns an object containing array property descriptors for the given | ||
* range of array indices. | ||
*/ | ||
export const getNodeChildren = remoteFunction(function( | ||
this: Node, | ||
start: number, | ||
count: number, | ||
) { | ||
const result: Record<number, Node | string> = {}; | ||
const from = start === -1 ? 0 : start; | ||
const to = count === -1 ? this.childNodes.length : start + count; | ||
for (let i = from; i < to && i < this.childNodes.length; ++i) { | ||
const cn = this.childNodes[i]; | ||
result[i] = cn.nodeName === '#text' ? (cn.textContent || '') : this.childNodes[i]; | ||
} | ||
|
||
return result; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.