Skip to content

Commit 9a266d4

Browse files
committed
inc review
1 parent dcb37a4 commit 9a266d4

4 files changed

Lines changed: 92 additions & 71 deletions

File tree

microsoft-edge/devtools-guide-chromium/sample-code/sample-code.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -156,25 +156,6 @@ This is the source code repo and its directory which stores the files for this d
156156
* `get-started.js` - The JavaScript file that's used by the form in the demo webpage.
157157

158158

159-
<!-- ====================================================================== -->
160-
## Tools that support cloning a repo and git commit/pull/push operations
161-
162-
Cloning a repo enables updating your local copy when the repo is updated. Many tools support cloning and syncing with a GitHub repo, such as:
163-
164-
* git commands at a command prompt such as the "git bash" shell. This is the main way that's documented here.
165-
166-
* GitHub Desktop. Integrates well with GitHub repos and pull requests, and with VS Code.
167-
168-
* Visual Studio Code. In the Activity Bar on the left, click **Source Control**.
169-
170-
* Visual Studio > **Git Changes** tab next to the **Solution Explorer** tab in the lower right.
171-
172-
* The "dot key" version of VS Code within the Edge browser. At Github.com, when viewing a branch or a pull request (PR), press the period (**.**) key. In the Activity Bar on the left, click:
173-
* **Source Control**
174-
* **GitHub Pull Requests**
175-
* **GitHub Pull Request**
176-
177-
178159
<!-- ====================================================================== -->
179160
## Clone the Edge Demos repo to your drive
180161

@@ -240,6 +221,25 @@ See also:
240221
* [Clone the WebView2Samples repo](../../webview2/how-to/machine-setup.md#clone-the-webview2samples-repo) in _Set up your Dev environment for WebView2_.
241222

242223

224+
<!-- ------------------------------ -->
225+
#### Tools that support cloning a repo and git commit/pull/push operations
226+
227+
Cloning a repo enables updating your local copy when the repo is updated. Many tools support cloning and syncing with a GitHub repo, such as:
228+
229+
* git commands at a command prompt such as the "git bash" shell. This is the main way that's documented here.
230+
231+
* GitHub Desktop. Integrates well with GitHub repos and pull requests, and with VS Code.
232+
233+
* Visual Studio Code. In the Activity Bar on the left, click **Source Control**.
234+
235+
* Visual Studio > **Git Changes** tab next to the **Solution Explorer** tab in the lower right.
236+
237+
* The "dot key" version of VS Code within the Edge browser. At Github.com, when viewing a branch or a pull request (PR), press the period (**.**) key. In the Activity Bar on the left, click:
238+
* **Source Control**
239+
* **GitHub Pull Requests**
240+
* **GitHub Pull Request**
241+
242+
243243
<!-- ====================================================================== -->
244244
## Download the Demos repo
245245

microsoft-edge/devtools-guide-chromium/sources/index.md

Lines changed: 25 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -28,31 +28,7 @@ Use the **Sources** tool to view, modify, and debug front-end JavaScript code, a
2828

2929
**Detailed contents:**
3030

31-
[Add a local folder to the workspace, to use DevTools to edit files and save changes to disk](#add-a-local-folder-to-the-workspace-to-use-devtools-to-edit-files-and-save-changes-to-disk)
32-
33-
34-
* [The Navigator, Editor, and Debugger panes](#the-navigator-editor-and-debugger-panes)
35-
* [Using the Navigator pane to select files](#using-the-navigator-pane-to-select-files)
36-
* [Using the Page tab to explore resources that construct the current webpage](#using-the-page-tab-to-explore-resources-that-construct-the-current-webpage)
37-
* [Add a local folder to the workspace, to use DevTools to edit files and save changes to disk](#add-a-local-folder-to-the-workspace-to-use-devtools-to-edit-files-and-save-changes-to-disk)
38-
* [Using the Overrides tab to override server files with local files](#using-the-overrides-tab-to-override-server-files-with-local-files)
39-
* [Using the Content scripts tab for Microsoft Edge extensions](#using-the-content-scripts-tab-for-microsoft-edge-extensions)
40-
* [Using the Snippets tab to run JavaScript code snippets on any webpage](#using-the-snippets-tab-to-run-javascript-code-snippets-on-any-webpage)
41-
* [Using the Command Menu to open files](#using-the-command-menu-to-open-files)
42-
* [Using the Editor pane to view or edit files](#using-the-editor-pane-to-view-or-edit-files)
43-
* [Editing a JavaScript file](#editing-a-javascript-file)
44-
* [Reformatting a minified JavaScript file with pretty-print](#reformatting-a-minified-javascript-file-with-pretty-print)
45-
* [Mapping minified code to your source code to show readable code](#mapping-minified-code-to-your-source-code-to-show-readable-code)
46-
* [Transformations from source code to compiled front-end code](#transformations-from-source-code-to-compiled-front-end-code)
47-
* [Editing a CSS file](#editing-a-css-file)
48-
* [Editing an HTML file](#editing-an-html-file)
49-
* [Going to a line number or function](#going-to-a-line-number-or-function)
50-
* [Quick source tool, to display source files when using a different tool](#quick-source-tool-to-display-source-files-when-using-a-different-tool)
51-
* [Using the Debugger pane to debug JavaScript code](#using-the-debugger-pane-to-debug-javascript-code)
52-
* [The basic approach to using a debugger](#the-basic-approach-to-using-a-debugger)
53-
* [Advantages of the debugger's Watch and Scope over console.log](#advantages-of-the-debuggers-watch-and-scope-over-consolelog)
54-
* [Debug from Visual Studio Code directly](#debug-from-visual-studio-code-directly)
55-
* [Articles about debugging](#articles-about-debugging)
31+
todo: update
5632

5733
<!-- omit h4s
5834
* [Icons in the Page tab](#icons-in-the-page-tab)
@@ -172,12 +148,13 @@ To change how resources are grouped:
172148

173149
Use the **Workspace** tab in the **Sources** tool to view and edit local files in DevTools. The **Workspace** tab is useful when used in conjunction with a local web server as you can then load your local website in Edge, and edit its source files in DevTools.
174150

175-
When you add a folder to the **Workspace** tab, that files and subfolders in that folder are displayed in the tab, and you can open files to view and edit them.
151+
When you add a folder to the **Workspace** tab, the files and subfolders in that folder are displayed in the tab, and you can open files to view and edit them.
176152

177153
The **Workspace** tab does not show the resources that the browser downloaded to display the webpage; the **Workspace** tab only shows the folders and files that are inside the local folders that you added.
178154

179-
<!-- do green dots appear? maybe un-comment -->
180-
<!-- A file that's in a Workspace is indicated by a green dot next to the file name, throughout DevTools. -->
155+
Throughout DevTools, a green "mapped" dot appears on a file for which DevTools was able to find a mapping between the workspace file and the webpage resource. For example, if the page uses a stylesheet called `styles.css` and the workspace has a file called `styles.css`, DevTools maps the files to each other and displays a green "mapped" dot.
156+
157+
The green "mapped" dot indicates that changes you make to webpage resources will be saved. For example, when you make a change inside the **Styles** tab of the **Elements** tool, you're editing the webpage stylesheet (not the file). If the CSS file name that's shown in the **Styles** tab has a green "mapped" dot, that stylesheet has been mapped to a file in your workspace, and your changes won't be lost.
181158

182159
![The Workspace tab in the Sources tool](./index-images/sources-workspace-tab.png)
183160
<!-- updating png:
@@ -212,7 +189,7 @@ See also:
212189

213190
Use the **Overrides** tab in the **Sources** tool to override any response from a webserver with local files. The **Overrides** tab is useful to make temporary changes to individual files, such as a CSS file, on any website. Use **Overrides** when you want to experiment with changes to a webpage, and you need to keep the changes after you refresh the webpage, but you don't care about mapping your changes to the source code of the webpage.
214191

215-
To start using the **Overrides** tab, create a new folder on your file system, and then select that folder in the **Overrides** tab. From then on, any changes that you make in the **Styles** tab of the **Elements** tool, or in the **Page** tab of the **Sources** tool, are saved in the new folder. DevTools uses the local files to override the server responses to<!-- todo: to? --> the matching resources.
192+
To start using the **Overrides** tab, create a new folder on your file system, and then select that folder in the **Overrides** tab. From then on, any changes that you make in the **Styles** tab of the **Elements** tool, or in the **Page** tab of the **Sources** tool, are saved in the new folder. DevTools uses the local files to override the matching server responses.
216193

217194
![The Overrides tab of the Navigator pane](./index-images/overrides-tab.png)
218195

@@ -435,13 +412,26 @@ In this scenario, the **Sources** tool is useful for inspecting and stepping-thr
435412

436413

437414
<!-- ------------------------------ -->
438-
#### Editing a CSS file
415+
#### Editing CSS
416+
417+
There are two places to edit CSS rules and their properties in DevTools:
418+
419+
* In the **Styles** tab in the **Elements** tool, edit CSS properties through user interface controls.
439420

440-
There are two ways to edit CSS in DevTools:
441-
* In the **Elements** tool, you work with one CSS property at a time, through user interface controls. This approach is recommended in most cases. For more information, see [Get started viewing and changing CSS](../css/index.md). Do not edit CSS in the **Elements** tool when using a **Workspace**; see [Editing a CSS file when using a Workspace](#editing-a-css-file-when-using-a-workspace), below.
442-
* In the **Sources** tool, you use a text editor to edit CSS files.
421+
* In the **Page** tab or **Workspace** tab in the **Sources** tool, use the text editor to edit a CSS file.
443422

444-
The **Sources** tool supports directly editing a CSS file. For example, if you edit the CSS file from the tutorial [Edit and save files in a workspace](../workspaces/index.md) to match the style rule below, the `H1` element in the upper left of the rendered webpage changes to green:
423+
424+
<!-- ---------- -->
425+
###### Editing CSS by using the Styles tab in the Elements tool, when using the Workspace tab of the Sources tool
426+
427+
See also:
428+
* [Limitations of the workspace feature with transformed source code](../workspaces/index.md#limitations-of-the-workspace-feature-with-transformed-source-code)
429+
430+
431+
<!-- ---------- -->
432+
###### The Page tab or Workspace tab in the Sources tool
433+
434+
The **Page** or **Workspace** tab in the **Sources** tool supports directly editing a CSS file. For example, if you edit the CSS file from the tutorial [Edit and save files in a workspace](../workspaces/index.md) to match the style rule below, the `H1` element in the upper left of the rendered webpage changes to green:
445435

446436
```css
447437
h1 {
@@ -454,26 +444,12 @@ h1 {
454444
CSS changes take effect immediately; you don't need to manually save the changes.
455445

456446
See also:
447+
* [Get started viewing and changing CSS](../css/index.md).
457448
* [Edit CSS font styles and settings in the Styles pane](../inspect-styles/edit-fonts.md)
458449
* [Sources tool keyboard shortcuts](../shortcuts/index.md#sources-tool-keyboard-shortcuts) in _Keyboard shortcuts_
459450
* [Open a demo folder from the Workspace tab in the Sources tool](../../devtools-guide-chromium/sample-code/sample-code.md#open-a-demo-folder-from-the-workspace-tab-in-the-sources-tool)
460451

461452

462-
<!-- ---------- -->
463-
###### Editing a CSS file when using a Workspace
464-
465-
Do not use the **Elements** tool to edit CSS files when you are using the **Workspace** feature.
466-
467-
If you are using a **Workspace**, edit the CSS in the **Sources** tool (not in the **Elements** tool), because the source files that you edit might be built or compiled by a build script before being served by your local server.
468-
When you edit in the **Elements** tool, you might be editing the compiled-and-built version of the file, not the source file.
469-
470-
When you use a **Workspace**:
471-
1. Edit the file in the **Sources** tool.
472-
1. Save the change.
473-
1. Build again. Some build systems do this automatically, when they detect a change.
474-
1. Reload the page. Some servers do this automatically when they detect a change.
475-
476-
477453
<!-- ------------------------------ -->
478454
#### Editing an HTML file
479455

microsoft-edge/devtools-guide-chromium/workspaces/index.md

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Here's a typical scenario for using a workspace:
5353

5454
Your website might use a build system which you need to run before you can see the changes. Web developers often use a build system that watches for saved changes in the source code files. When you save a change to a source code file, the build system builds those changes and then automatically refreshes the page in the browser.
5555

56-
If you use such an automated build system, when you make a change to a source file in the **Sources** tool and save it, you automatically immediately see those changes applied to the rendered web page.
56+
If you use such an automated build system, when you make a change to a source file in the **Sources** tool and save it, you automatically see those changes applied to the rendered web page.
5757

5858
The tutorial steps below walk you through this environment setup.
5959

@@ -65,7 +65,32 @@ The tutorial steps below walk you through this environment setup.
6565
If you're using a modern framework, it might transform your source code from a format that's easy to maintain into a format that's optimized to run as quickly as possible. The **Workspace** tab in the **Sources** tool is usually able to map the optimized code back to the original source code, by using [source maps](https://blog.teamtreehouse.com/introduction-source-maps) for JavaScript and CSS. However, there's a lot of variation in how each framework uses source maps.
6666

6767
DevTools doesn't support every framework variation. If you run into issues while using workspaces with your framework of choice, or you identify framework-specific steps that are needed, please reach out to use by opening an issue on the [MicrosoftEdge/DevTools](https://github.com/MicrosoftEdge/DevTools/issues) repository.
68-
68+
69+
70+
<!-- ---------- -->
71+
###### Editing CSS by using the Styles tab in the Elements tool, when using the Workspace tab of the Sources tool
72+
<!-- todo: condense and integrate -->
73+
74+
If you use a workspace, in some cases you can edit CSS in the **Styles** tab in the **Elements** tool and have the changes saved to the mapped file on disk:
75+
76+
* Edits that you make in the **Styles** tab in the **Elements** tool _are_ saved to the CSS file on disk, if DevTools has mapped a style sheet on the webpage and the file in the workspace, such as by a source map, or by matching content.
77+
78+
If you use an automatic build system framework, changes are saved to your source file if DEvTools was able to map the style sheet to the workspace file, by using a source map.
79+
80+
Depending on the automated build system or framework that you use, DevTools may be able to save changes to disk, if there's no build step, or there's a build step and a source map. The **Styles** tab is mapped to the CSS file on disk, and so edits in the **Styles** tab are saved to disk.
81+
82+
* Edits that you make in the **Styles** tab in the **Elements** tool are _not_ saved to the CSS file on disk, if the stylesheet isn't mapped to a workspace file. Editing CSS in the **Styles** tab of the **Elements** tool will lose changes; the changes aren't saved to disk.
83+
84+
85+
If you are using a **Workspace**, edit the CSS in the **Sources** tool (not in the **Elements** tool), because the source files that you edit might be built or compiled by a build script before being served by your local server.
86+
When you edit in the **Elements** tool, you might be editing the compiled-and-built version of the file, not the source file.
87+
88+
When you use a **Workspace**:
89+
1. Edit the file in the **Sources** tool.
90+
1. Save the change.
91+
1. Build again. Some build systems do this automatically, when they detect a change.
92+
1. Reload the page. Some servers do this automatically when they detect a change.
93+
6994

7095
<!-- ------------------------------ -->
7196
#### Related feature: Local Overrides
@@ -82,7 +107,7 @@ See also:
82107

83108

84109
<!-- ====================================================================== -->
85-
## Step 1: Setup
110+
## Step 1: Set up the code, server, and workspace
86111
<!-- https://developer.chrome.com/docs/devtools/workspaces/#setup -->
87112

88113
* Install an up-to-date version of Node.js and npm from [Node.js](https://nodejs.org).

microsoft-edge/web-platform/ad-selection-api.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,26 @@ ms.date: 10/10/2024
1212

1313
The Ad Selection API provides user-relevant ads on your site without using third-party cookies. See [Ad Selection Overview](https://github.com/WICG/privacy-preserving-ads/blob/main/Ad%20Selection%20Overview.md) in the `privacy-preserving-ads` repo.
1414

15+
**Detailed contents:**
16+
17+
* [Attestation enrollment and alpha sign-up](#attestation-enrollment-and-alpha-sign-up)
18+
* [When and where is the preview available?](#when-and-where-is-the-preview-available)
19+
* [Flags for testing](#flags-for-testing)
20+
* [Sign-up and attestation requirements and process](#sign-up-and-attestation-requirements-and-process)
21+
* [Example JSON file](#example-json-file)
22+
* [Important fields and values](#important-fields-and-values)
23+
* [Deploy the Ad Selection API services](#deploy-the-ad-selection-api-services)
24+
* [Images for deploying services](#images-for-deploying-services)
25+
* [Services for sellers](#services-for-sellers)
26+
* [Services for buyers](#services-for-buyers)
27+
* [User-Defined Functions](#user-defined-functions)
28+
* [User-Defined Functions for sellers](#user-defined-functions-for-sellers)
29+
* [User-Defined Functions for buyers](#user-defined-functions-for-buyers)
30+
* [Deployment guide](#deployment-guide)
31+
* [Use the Ad Selection API on your website](#use-the-ad-selection-api-on-your-website)
32+
* [Provide feedback about the origin trial](#provide-feedback-about-the-origin-trial)
33+
* [See also](#see-also)
34+
1535
The Ad Selection API can be used by:
1636
* **Sellers** running a supply-side platform (SSP), who can use the API to provide higher-quality ads for their publishers.
1737
* **Buyers** running a demand-side platform (DSP), who can use the API to improve the effectiveness of advertising campaigns.

0 commit comments

Comments
 (0)