Skip to content

Commit

Permalink
Remove all remaining anch() macro calls (#14063)
Browse files Browse the repository at this point in the history
  • Loading branch information
queengooborg authored Mar 19, 2022
1 parent bed66db commit 035dfa0
Show file tree
Hide file tree
Showing 27 changed files with 41 additions and 42 deletions.
2 changes: 1 addition & 1 deletion files/en-us/mdn/structures/macros/other/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ These macros have been replace by other ways of doing the same thing, and should
### Linking

- The [`SectionOnPage`](https://github.com/mdn/yari/tree/master/kumascript/macros/SectionOnPage.ejs) macro creates a phrase that links to both the name of a section and the article containing that section. For example, `\{{SectionOnPage("/en-US/docs/Mozilla/Firefox/Releases/21", "Changes for Web developers")}}` outputs the following: _{{SectionOnPage("/en-US/docs/Mozilla/Firefox/Releases/21", "Changes for Web developers")}}_.
- **Do not use the [`anch`](https://github.com/mdn/yari/tree/master/kumascript/macros/anch.ejs) macro. It has been deprecated. Instead use a regular Markdown link with the `coding` style.** The [`anch`](https://github.com/mdn/yari/tree/master/kumascript/macros/anch.ejs) macro was used in the past to insert a link to an anchor. `\{\{Anch("top")\}\}` produced `<a href="#top">top</a>` ({{ Anch("top") }}). You could add a second parameter, which contained replacement text to display as the link text.
- **Do not use the [`anch`](https://github.com/mdn/yari/tree/master/kumascript/macros/anch.ejs) macro. It has been deprecated. Instead use a regular Markdown link with the `coding` style.** The [`anch`](https://github.com/mdn/yari/tree/master/kumascript/macros/anch.ejs) macro was used in the past to insert a link to an anchor. `\{\{Anch("top")\}\}` produced `<a href="#top">top</a>` ([top](#top)). You could add a second parameter, which contained replacement text to display as the link text.
- **Do not use the [`manch`](https://github.com/mdn/yari/tree/master/kumascript/macros/manch.ejs) macro. It has been deprecated. Instead use a regular Markdown link with the `coding` style.** The [`manch`](https://github.com/mdn/yari/tree/master/kumascript/macros/manch.ejs) was used in the past to insert a link to a method within the current interface; this was intended only for use in interface documentation pages. `\{\{manch("foo")\}\}` produced `<code><a href="current/path#foo">foo()</a></code>` ({{ manch("foo") }}).
- The [`Link`](https://github.com/mdn/yari/tree/master/kumascript/macros/Link.ejs) macro inserts a link to the specified page on MDN, using the page's title as the visible string to click on, and the tooltip picked up from the page's SEO summary.
- The [`LinkItem`](https://github.com/mdn/yari/tree/master/kumascript/macros/LinkItem.ejs) macro inserts a link to a specified URL, with the indicated text as the visible string to click on. The link automatically picks up as its tooltip the summary of the target page. This differs from [`Link`](https://github.com/mdn/yari/tree/master/kumascript/macros/Link.ejs) in that you must specify the title.
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/mdn/tools/kumascript/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ When the wiki makes a call to the KumaScript service, it passes along some conte
- `env.id`
- : A short, unique ID for the current MDN document
- `env.files`
- : An array of the files attached to the current MDN document; each object in the array is as described under {{ anch("File objects") }} below
- : An array of the files attached to the current MDN document; each object in the array is as described under [File objects](#file_objects) below
- `env.review_tags`
- : An array of the review tags on the article ("technical", "editorial", etc.)
- `env.locale`
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/mozilla/firefox/releases/7/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ Support has been added for multi-reporters; that is, memory reporters that gathe

### Changes to the build system

- The ActiveX embedding API is no longer built and support has been removed from the build system. Supporting interfaces have also been removed; see {{ anch("Removed interfaces") }}.
- The ActiveX embedding API is no longer built and support has been removed from the build system. Supporting interfaces have also been removed; see [Removed interfaces](#removed_interfaces).
- You should no longer specify `-Zc:wchar_t-` when building on Windows. See the [updated Build documentation](/en-US/docs/Mozilla/Developer_guide/Build_Instructions#build_and_install) for details.

### Interface changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<p class="summary"><span class="seoSummary">This technique demonstrates how to use the <a href="https://www.w3.org/TR/wai-aria-1.0/roles#slider" rel="external">slider</a> role and describes the effect it has on browsers and assistive technology.</span></p>

<p>The <code>slider</code> role is used for markup that allows a user to select a value from within a given range. The slider role is assigned to the "thumb," the control that is adjusted to change the value. As the user interacts with the thumb, the application must programmatically adjust the slider's <code>aria-valuenow</code> (and possible <code>aria-valuetext</code>) attribute to reflect the current value. See the {{ anch("Examples") }} section below for more information.</p>
<p>The <code>slider</code> role is used for markup that allows a user to select a value from within a given range. The slider role is assigned to the "thumb," the control that is adjusted to change the value. As the user interacts with the thumb, the application must programmatically adjust the slider's <code>aria-valuenow</code> (and possible <code>aria-valuetext</code>) attribute to reflect the current value. See the <a href="#examples">Examples</a> section below for more information.</p>

<h3 id="Keyboard_And_Focus">Keyboard And Focus</h3>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ None, except as required by any attributes. For example, setting [`aria-busy`](/

## Best practices

To ensure good user experience, avoid inserting or removing articles in the middle of a `feed`, load new articles before the user has reached the end of the feed, and provide keyboard commands for moving focus among articles so that keyboard users can navigate through your feed. See {{anch('Keyboard interactions')}}.
To ensure good user experience, avoid inserting or removing articles in the middle of a `feed`, load new articles before the user has reached the end of the feed, and provide keyboard commands for moving focus among articles so that keyboard users can navigate through your feed. See [Keyboard interactions](#keyboard_interactions).

## Specifications

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/document/createevent/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ var event = document.createEvent(type);
- `type` is a string that represents the type of event to be
created. Possible event types include `"UIEvents"`,
`"MouseEvents"`, `"MutationEvents"`, and
`"HTMLEvents"`. See {{Anch("Notes")}} section for details.
`"HTMLEvents"`. See [Notes](#notes) section for details.

## Example

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/document/createnodeiterator/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const nodeIterator = document.createNodeIterator(root[, whatToShow[, filter]]);
to include it in the list of iterable nodes (a simple callback function may also be
used instead). The method should return one of `NodeFilter.FILTER_ACCEPT`,
`NodeFilter.FILTER_REJECT`, or `NodeFilter.FILTER_SKIP`. See the
{{ anch("Example") }}.
[Example](#example).

## Example

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/document/title/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ var docTitle = document.title;

_docTitle_ is a string containing the _document_'s title. If the
title was overridden by setting `document.title`, it contains that value.
Otherwise, it contains the title specified in the markup (see the {{Anch("Notes")}}
Otherwise, it contains the title specified in the markup (see the [Notes](#notes)
below).

```js
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/element/getattributens/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ browser-compat: api.Element.getAttributeNS
The **`getAttributeNS()`** method of the {{domxref("Element")}}
interface returns the string value of the attribute with the specified namespace and
name. If the named attribute does not exist, the value returned will either be
`null` or `""` (the empty string); see {{Anch("Notes")}} for
`null` or `""` (the empty string); see [Notes](#notes) for
details.

## Syntax
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/file_handle_api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ IDBReq.onsuccess = function(){

{{domxref("IDBDatabase.createMutableFile","createMutableFile()")}} takes two arguments: a name and an optional type. Both of these are just descriptive and are not used by the database. However, they are important for the {{domxref("FileHandle")}} object as it can generate {{domxref("File")}} objects which inherit their own {{domxref("File.name","name")}} and {{domxref("File.type","type")}} from those values. That said, as the name does not match any real filename it can be an empty string, for example, and it doesn't even have to be unique.

> **Note:** the above code only creates a "temporary file" that exists only while you hold the {{domxref("FileHandle")}} instance. If you want a file to survive a page refresh/app relaunch, you need to store the handle in a more permanent location, like the database itself. See {{Anch("File storage")}} below to learn more about this.
> **Note:** the above code only creates a "temporary file" that exists only while you hold the {{domxref("FileHandle")}} instance. If you want a file to survive a page refresh/app relaunch, you need to store the handle in a more permanent location, like the database itself. See [File storage](#file_storage) below to learn more about this.
### Perform read and write operations

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/fullscreen_api/guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ It's not guaranteed that you'll be able to switch into fullscreen mode. For exam
## Getting out of full screen mode

The user always has the ability to exit fullscreen mode of their own accord; see {{Anch("Things your users want to know")}}. You can also do so programmatically by calling the {{DOMxRef("Document.exitFullscreen()")}} method.
The user always has the ability to exit fullscreen mode of their own accord; see [Things your users want to know](#things_your_users_want_to_know). You can also do so programmatically by calling the {{DOMxRef("Document.exitFullscreen()")}} method.

## Other information

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/html_drag_and_drop_api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ The {{domxref("DragEvent")}} interface has a constructor and one {{domxref("Drag

{{domxref("DataTransfer")}} objects include the drag event's state, such as the type of drag being done (like `copy` or `move`), the drag's data (one or more items), and the MIME type of each _drag item_. {{domxref("DataTransfer")}} objects also have methods to add or remove items to the drag's data.

The {{domxref("DragEvent")}} and {{domxref("DataTransfer")}} interfaces should be the only ones needed to add HTML Drag and Drop capabilities to an application. (Firefox supports some {{anch("Gecko specific interfaces","Gecko-specific extensions")}} to the {{domxref("DataTransfer")}} object, but those extensions will only work on Firefox.)
The {{domxref("DragEvent")}} and {{domxref("DataTransfer")}} interfaces should be the only ones needed to add HTML Drag and Drop capabilities to an application. (Firefox supports some [Gecko-specific extensions](#gecko_specific_interfaces) to the {{domxref("DataTransfer")}} object, but those extensions will only work on Firefox.)

Each {{domxref("DataTransfer")}} object contains an {{domxref("DataTransfer.items","items")}} property, which is a {{domxref("DataTransferItemList","list")}} of {{domxref("DataTransferItem")}} objects. A {{domxref("DataTransferItem")}} object represents a single _drag item_, each with a {{domxref("DataTransferItem.kind","kind")}} property (either `string` or `file`) and a {{domxref("DataTransferItem.type","type")}} property for the data item's MIME type. The {{domxref("DataTransferItem")}} object also has methods to get the drag item's data.

Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/api/indexeddb_api/using_indexeddb/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ One of the common possible errors when opening a database is `VER_ERR`. It indic

### Creating or updating the version of the database

When you create a new database or increase the version number of an existing database (by specifying a higher version number than you did previously, when {{ anch("Opening a database") }}), the `onupgradeneeded` event will be triggered and an [IDBVersionChangeEvent](/en-US/docs/Web/API/IDBVersionChangeEvent) object will be passed to any `onversionchange` event handler set up on `request.result` (i.e., `db` in the example). In the handler for the `upgradeneeded` event, you should create the object stores needed for this version of the database:
When you create a new database or increase the version number of an existing database (by specifying a higher version number than you did previously, when [Opening a database](#opening_a_database)), the `onupgradeneeded` event will be triggered and an [IDBVersionChangeEvent](/en-US/docs/Web/API/IDBVersionChangeEvent) object will be passed to any `onversionchange` event handler set up on `request.result` (i.e., `db` in the example). In the handler for the `upgradeneeded` event, you should create the object stores needed for this version of the database:

```js
// This event is only implemented in recent browsers
Expand Down Expand Up @@ -343,7 +343,7 @@ customerData.forEach(customer => {
});
```

The `result` of a request generated from a call to `add()` is the key of the value that was added. So in this case, it should equal the `ssn` property of the object that was added, since the object store uses the `ssn` property for the key path. Note that the `add()` function requires that no object already be in the database with the same key. If you're trying to modify an existing entry, or you don't care if one exists already, you can use the `put()` function, as shown below in the {{ anch("Updating an entry in the database") }} section.
The `result` of a request generated from a call to `add()` is the key of the value that was added. So in this case, it should equal the `ssn` property of the object that was added, since the object store uses the `ssn` property for the key path. Note that the `add()` function requires that no object already be in the database with the same key. If you're trying to modify an existing entry, or you don't care if one exists already, you can use the `put()` function, as shown below in the [Updating an entry in the database](#updating_an_entry_in_the_database) section.

### Removing data from the database

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ tags:

A fundamental requirement of web performance is a precise and consistent definition of _time._ The {{domxref("DOMHighResTimeStamp")}} type (a `double`) is used by all performance interfaces to hold such time values. Additionally, there must be a way to create a _timestamp_ for a specific point in time; this is done with the {{domxref("Performance.now","now()")}} method.

Web performance interfaces are defined in a [suite of standards](https://www.w3.org/wiki/Web_Performance/Publications). The _base_ interface for these standards is the {{domxref("Performance")}} interface and its methods and properties are extended by different standards. This guide describes how to use the {{domxref("Performance")}} interfaces that are defined in the [High-Resolution Time](https://w3c.github.io/hr-time/) standard. Other web performance guides (listed in the {{anch("See_also","See also")}} section) describe how to use additional methods and properties of the {{domxref("Performance")}} interface.
Web performance interfaces are defined in a [suite of standards](https://www.w3.org/wiki/Web_Performance/Publications). The _base_ interface for these standards is the {{domxref("Performance")}} interface and its methods and properties are extended by different standards. This guide describes how to use the {{domxref("Performance")}} interfaces that are defined in the [High-Resolution Time](https://w3c.github.io/hr-time/) standard. Other web performance guides (listed in the [See also](#see_also) section) describe how to use additional methods and properties of the {{domxref("Performance")}} interface.

## High precision timing

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/performance_timeline/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ tags:
---
{{DefaultAPISidebar("Performance Timeline API")}}

The **Performance Timeline** API defines extensions to the {{domxref("Performance")}} interface to support client-side latency measurements within applications. The extensions provide interfaces to retrieve {{domxref("PerformanceEntry","performance entry metrics", '', 'true')}} based on specific filter criteria. The standard also includes interfaces that allow an application to define _{{anch("Performance_Observers","performance observer", '', 'true')}}_ callbacks that are notified when specific performance events are added to the browser's _performance timeline_.
The **Performance Timeline** API defines extensions to the {{domxref("Performance")}} interface to support client-side latency measurements within applications. The extensions provide interfaces to retrieve {{domxref("PerformanceEntry","performance entry metrics", '', 'true')}} based on specific filter criteria. The standard also includes interfaces that allow an application to define _[performance observer](#performance_observers)_ callbacks that are notified when specific performance events are added to the browser's _performance timeline_.

This document provides an overview of the standard's interfaces. For more details about the interfaces, see the reference pages and [Using Performance Timeline](/en-US/docs/Web/API/Performance_Timeline/Using_Performance_Timeline).

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/pushmanager/registrations/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ var request = navigator.push.registrations();
A {{domxref("DOMRequest")}} object to handle the success or failure of the method call.

If the method call is successful, the request's `result` will be an array of
{{Anch("PushRegistration")}} objects.
[PushRegistration](#pushregistration) objects.

### PushRegistration

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/pushmanager/unregister/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ var request = navigator.push.unregister(pushEndpoint);
A {{domxref("DOMRequest")}} object to handle the success or failure of the method call.

If the method call is successful, the request's `result` will be a
{{Anch("PushRegistration")}} object representing the endpoint that has been
[PushRegistration](#pushregistration) object representing the endpoint that has been
unregistered.

### PushRegistration
Expand Down
3 changes: 1 addition & 2 deletions files/en-us/web/api/rtcicecandidate/relatedport/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ For host candidates, `relatedPort` is `null`, meaning the field is not included

The related address and port are not used by ICE itself, and are only present for
diagnostic and Quality-of-Service purposes. They may in fact be omitted for security
reasons, but if present can be a useful tool during debugging. See the {{anch("Example",
"example")}}, which shows a bit of this.
reasons, but if present can be a useful tool during debugging. See the [Example](#example), which shows a bit of this.

Here's an {{Glossary("SDP")}} attribute line (a-line) describing an ICE candidate
discovered by the STUN server:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ This code is similar, except that it will be called automatically whenever the s
## Sending events from the server

The server-side script that sends events needs to respond using the MIME type `text/event-stream`. Each notification is sent as a block of text terminated by a pair of newlines. For details on the format of the event stream, see {{ anch("Event stream format") }}.
The server-side script that sends events needs to respond using the MIME type `text/event-stream`. Each notification is sent as a block of text terminated by a pair of newlines. For details on the format of the event stream, see [Event stream format](#event_stream_format).

The {{Glossary("PHP")}} code for the example we're using here follows:

Expand Down
Loading

0 comments on commit 035dfa0

Please sign in to comment.