diff --git a/files/en-us/learn/common_questions/tools_and_setup/what_are_browser_developer_tools/2014-01-10-13-08-08-f52b8c.png b/files/en-us/learn/common_questions/tools_and_setup/what_are_browser_developer_tools/2014-01-10-13-08-08-f52b8c.png deleted file mode 100644 index 8a1cb2b691431de..000000000000000 Binary files a/files/en-us/learn/common_questions/tools_and_setup/what_are_browser_developer_tools/2014-01-10-13-08-08-f52b8c.png and /dev/null differ diff --git a/files/en-us/learn/common_questions/tools_and_setup/what_are_browser_developer_tools/index.md b/files/en-us/learn/common_questions/tools_and_setup/what_are_browser_developer_tools/index.md index b797dc1c3c4030c..cf6123656d0f54b 100644 --- a/files/en-us/learn/common_questions/tools_and_setup/what_are_browser_developer_tools/index.md +++ b/files/en-us/learn/common_questions/tools_and_setup/what_are_browser_developer_tools/index.md @@ -27,10 +27,14 @@ How do you pull it up? Three ways: - **_Menu bar:_** - - **Firefox:** Menu ![Firefox hamburger menu icon that has more options to customize and control Firefox.](2014-01-10-13-08-08-f52b8c.png) _➤ More tools ➤ Web Developer Tools_ + - **Firefox:** _Menu (☰) ➤ More tools ➤ Web Developer Tools_ - **Chrome:** _More tools ➤ Developer tools_ - - **Safari:** _Develop ➤ Show Web Inspector._ If you can't see the _Develop_ menu, go to _Safari ➤ Preferences ➤ Advanced_, and check the _Show Develop menu in menu bar_ checkbox. - **Opera**: _Developer ➤ Developer tools_ + - **Safari:** _Develop ➤ Show Web Inspector._ + + > [!NOTE] + > The Safari developer tools are not enabled by default. + > To enable them, go to _Safari ➤ Preferences ➤ Advanced_, and check the _Show Develop menu in menu bar_ or _Enable features for web developers_ checkbox. - **_Context menu:_** Press-and-hold/right-click an item on a webpage (Ctrl-click on the Mac), and choose _Inspect Element_ from the context menu that appears. (_An added bonus:_ this method straight-away highlights the code of the element you right-clicked.) @@ -44,9 +48,8 @@ The developer tools usually open by default to the inspector, which looks someth If you _don't_ see the inspector, -- Tap/click the _Inspector_ tab. -- In Chrome, Microsoft Edge, or Opera, tap/click Elements. -- In Safari, the controls are not so clearly presented, but you should see the HTML if you haven't selected something else to appear in the window. Press the _Style_ button to see the CSS. +- **Firefox:** Select the **Inspector** tab. +- **Other browsers:** Select the **Elements** tab. ### Exploring the DOM inspector @@ -80,20 +83,23 @@ These features are especially handy: You'll notice a number of clickable tabs at the top of the CSS Viewer: - _Computed_: This shows the computed styles for the currently selected element (the final, normalized values that the browser applies). -- _Layout_: In Firefox, this area includes two sections: +- _Layout_: This shows the details for CSS [grid](/en-US/docs/Web/CSS/CSS_grid_layout) and [flexbox](/en-US/docs/Web/CSS/CSS_flexible_box_layout) layout modes if the element you are inspecting uses them. +- _Fonts_: In Firefox and Safari, the _Fonts_ tab shows the fonts applied to the current element. + +The _box model_ view visually represents the current element's box model, so you can see at a glance what padding, border and margin is applied to it, and how big its content is. In Firefox, this is located in the _Layout_ tab, and in other browsers it is in the _Computed_ tab. - - _Box Model_: represents visually the current element's box model, so you can see at a glance what padding, border and margin is applied to it, and how big its content is. - - _Grid_: If the page you are inspecting uses CSS grid, this section allows you to view the grid details. +In some browsers, the JavaScript details of the selected element can also be viewed in this panel. In Safari, these are unified under the _Node_ tab, but are in separate tabs in Chrome, Opera, and Edge. -- _Fonts_: In Firefox, the _Fonts_ tab shows the fonts applied to the current element. +- _Properties_: The {{Glossary("Property (JavaScript)", "properties")}} of the element object. +- _Event Listeners_: The [events](/en-US/docs/Web/API/Event) associated with the element. ### Find out more Find out more about the Inspector in different browsers: - [Firefox Page inspector](https://firefox-source-docs.mozilla.org/devtools-user/page_inspector/index.html) -- [Chrome DOM inspector](https://developer.chrome.com/docs/devtools/dom/) (Opera's inspector works the same as this) -- [Safari DOM inspector and style explorer](https://developer.apple.com/library/archive/documentation/AppleApplications/Conceptual/Safari_Developer_Guide/ResourcesandtheDOM/ResourcesandtheDOM.html#//apple_ref/doc/uid/TP40007874-CH3-SW1) +- [Chrome DOM inspector](https://developer.chrome.com/docs/devtools/dom/) (Opera and Edge's inspector is the same) +- [Safari Elements tab](https://webkit.org/web-inspector/elements-tab/) ## The JavaScript debugger @@ -103,15 +109,12 @@ The JavaScript debugger allows you to watch the value of variables and set break To get to the debugger: -**Firefox**: Select ![Firefox menu icon that has more options to customize and control Firefox.](2014-01-10-13-08-08-f52b8c.png) ➤ _Web Developer_ ➤ _Debugger_ or press Ctrl + Shift + S to open the JavaScript Debugger. If the tools are already displayed, click on the **Debugger** tab. - -**Chrome**: Open the Developer tools and then select the **Sources** tab. (Opera works the same way.) - -**Safari**: Open the Developer Tools and then select the Debugger tab. +**Firefox**: Open the Developer tools and select the **Debugger** tab. +**Other browsers**: Open the Developer tools and select the **Sources** tab. ### Exploring the debugger -There are three panes in the JavaScript Debugger on Firefox. +Each browser's JavaScript debugger is divided into three panes. The layout of these is somewhat different depending on the browser you are using; this guide uses Firefox as a reference. #### File list @@ -146,19 +149,14 @@ The final section, **Scopes**, shows what values are visible from various points Find out more about the JavaScript debugger in different browsers: - [Firefox JavaScript Debugger](https://firefox-source-docs.mozilla.org/devtools-user/debugger/index.html)) -- [Microsoft Edge Debugger](https://learn.microsoft.com/en-us/archive/microsoft-edge/legacy/developer/devtools-guide/debugger) -- [Chrome Debugger](https://developer.chrome.com/docs/devtools/javascript/) -- [Safari Debugger](https://developer.apple.com/safari/tools/) +- [Chrome Debugger](https://developer.chrome.com/docs/devtools/javascript/) (Opera and Edge's debugger is the same) +- [Safari Sources tab](https://webkit.org/web-inspector/sources-tab/) ## The JavaScript console -The JavaScript console is an incredibly useful tool for debugging JavaScript that isn't working as expected. It allows you to run lines of JavaScript against the page currently loaded in the browser, and reports the errors encountered as the browser tries to execute your code. To access the console in any browser: - -If the developer tools are already open, click or press the Console tab. - -If not, Firefox allows you to open the console directly using Ctrl + Shift + K or using the menu command: Menu ![Firefox menu](2014-01-10-13-08-08-f52b8c.png) _➤ Web Developer ➤ Web Console,_ or _Tools ➤_ _Web Developer ➤ Web Console._ On other browsers, open the developer tools and then click the Console tab. +The JavaScript console is an incredibly useful tool for debugging JavaScript that isn't working as expected. It allows you to run lines of JavaScript against the page currently loaded in the browser, and reports the errors encountered as the browser tries to execute your code. -This will give you a window like the following: +To access the console in any browser, open the developer tools and select the **Console** tab. This will give you a window like the following: ![The Console tab of the browser developer tools. Two JavaScript functions have been executed in the console. The user entered functions, and the console displayed the return values.](console_only.png) @@ -207,8 +205,8 @@ You'll start to see the kind of errors that the browser returns. Often these err Find out more about the JavaScript console in different browsers: - [Firefox Web Console](https://firefox-source-docs.mozilla.org/devtools-user/web_console/index.html) -- [Chrome JavaScript Console](https://developer.chrome.com/docs/devtools/console/) (Opera's inspector works the same as this) -- [Safari Console](https://developer.apple.com/library/archive/documentation/AppleApplications/Conceptual/Safari_Developer_Guide/Console/Console.html#//apple_ref/doc/uid/TP40007874-CH6-SW1) +- [Chrome JavaScript Console](https://developer.chrome.com/docs/devtools/console/) (Opera and Edge's console is the same) +- [Safari Console Object API](https://webkit.org/web-inspector/console-object-api/) and [Console Command Line API](https://webkit.org/web-inspector/console-command-line-api/) ## See also diff --git a/files/en-us/learn/css/building_blocks/cascade_layers/index.md b/files/en-us/learn/css/building_blocks/cascade_layers/index.md index a30e6cd800f4a7e..50517255e3f1d40 100644 --- a/files/en-us/learn/css/building_blocks/cascade_layers/index.md +++ b/files/en-us/learn/css/building_blocks/cascade_layers/index.md @@ -258,9 +258,9 @@ You can import more than one CSS file into a single layer. The following declara You can import styles and create layers based on specific conditions using [media queries](/en-US/docs/Web/CSS/CSS_media_queries/Using_media_queries) and [feature queries](/en-US/docs/Web/CSS/CSS_conditional_rules/Using_feature_queries). The following imports a style sheet into an `international` layer only if the browser supports `display: ruby`, and the file being imported is dependent on the width of the screen. ```css -@import url("ruby-narrow.css") layer(international) supports(display: ruby) and +@import url("ruby-narrow.css") layer(international) supports(display: ruby) (width < 32rem); -@import url("ruby-wide.css") layer(international) supports(display: ruby) and +@import url("ruby-wide.css") layer(international) supports(display: ruby) (width >= 32rem); ``` diff --git a/files/en-us/learn/forms/sending_and_retrieving_form_data/index.md b/files/en-us/learn/forms/sending_and_retrieving_form_data/index.md index f7e27d083a2c5bd..d0eb96517113b2d 100644 --- a/files/en-us/learn/forms/sending_and_retrieving_form_data/index.md +++ b/files/en-us/learn/forms/sending_and_retrieving_form_data/index.md @@ -213,7 +213,7 @@ This example displays a page with the data we sent. You can see this in action i ![Otherwise blank web page with "hi mom", the data received in response after submitting form data to a php file with POST method](php-result.png) > [!NOTE] -> This example won't work when you load it into a browser locally — browsers cannot interpret PHP code, so when the form is submitted the browser will just offer to download the PHP file for you. To get it to work, you need to run the example through a PHP server of some kind. Good options for local PHP testing are [MAMP](https://www.mamp.info/en/downloads/) (Mac and Windows) and [AMPPS](https://ampps.com/downloads/) (Mac, Windows, Linux). +> This example won't work when you load it into a browser locally — browsers cannot interpret PHP code, so when the form is submitted the browser will just offer to download the PHP file for you. To get it to work, you need to run the example through a PHP server of some kind. Good options for local PHP testing are [MAMP](https://www.mamp.info/en/downloads/) (Mac and Windows) and [XAMPP](https://www.apachefriends.org/download.html) (Mac, Windows, Linux). > > Note also that if you are using MAMP but don't have MAMP Pro installed (or if the MAMP Pro demo time trial has expired), you might have trouble getting it working. To get it working again, we have found that you can load up the MAMP app, then choose the menu options _MAMP_ > _Preferences_ > _PHP_, and set "Standard Version:" to "7.2.x" (x will differ depending on what version you have installed). diff --git a/files/en-us/learn/javascript/building_blocks/test_your_skills_colon__conditionals/index.md b/files/en-us/learn/javascript/building_blocks/test_your_skills_colon__conditionals/index.md index 74613ab9cfe98bd..3223f203a739260 100644 --- a/files/en-us/learn/javascript/building_blocks/test_your_skills_colon__conditionals/index.md +++ b/files/en-us/learn/javascript/building_blocks/test_your_skills_colon__conditionals/index.md @@ -53,6 +53,7 @@ Inside the first `if...else`, you need to nest another `if...else` that puts app - Score of 90 to 100 — "What an amazing score! Did you cheat? Are you for real?" Try updating the live code below to recreate the finished example. After you've entered your code, try changing `machineActive` to `true`, to see if it works. +Please note that, for the scope of this exercise, the `Your score is __` statement will remain on the screen regardless of the `machineActive`'s value. {{EmbedGHLiveSample("learning-area/javascript/building-blocks/tasks/conditionals/conditionals2.html", '100%', 400)}} diff --git a/files/en-us/learn/tools_and_testing/client-side_javascript_frameworks/vue_methods_events_models/index.md b/files/en-us/learn/tools_and_testing/client-side_javascript_frameworks/vue_methods_events_models/index.md index a39360888f515f0..b0ab4c97dfff637 100644 --- a/files/en-us/learn/tools_and_testing/client-side_javascript_frameworks/vue_methods_events_models/index.md +++ b/files/en-us/learn/tools_and_testing/client-side_javascript_frameworks/vue_methods_events_models/index.md @@ -78,7 +78,7 @@ We now have an app that displays a list of to-do items. However, we can't update 4. Let's load this component into our app. Go back to `App.vue` and add the following `import` statement just below the previous one, inside your ` diff --git a/files/en-us/web/api/webgl_api/tutorial/adding_2d_content_to_a_webgl_context/index.md b/files/en-us/web/api/webgl_api/tutorial/adding_2d_content_to_a_webgl_context/index.md index 58be911d44091df..77fa2e4240a0ddf 100644 --- a/files/en-us/web/api/webgl_api/tutorial/adding_2d_content_to_a_webgl_context/index.md +++ b/files/en-us/web/api/webgl_api/tutorial/adding_2d_content_to_a_webgl_context/index.md @@ -33,7 +33,7 @@ This project uses the [glMatrix](https://glmatrix.net/) library to perform its m
- +