]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
docs(scrollBehavior): update selector doc
authorEduardo San Martin Morote <posva13@gmail.com>
Tue, 26 May 2020 15:19:51 +0000 (17:19 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Fri, 12 Jun 2020 11:51:29 +0000 (13:51 +0200)
[skip ci]

src/scrollBehavior.ts

index 606b7b9487c177e5cb28003cb07a3dc9ac6961d4..92eb7df203c9ba6c866257bc8d2cd252e5391a75 100644 (file)
@@ -32,16 +32,15 @@ export type _ScrollPositionNormalized = {
 
 export interface ScrollPositionElement {
   /**
-   * A valid CSS selector.
-   *
+   * A valid CSS selector. Note some characters must be escaped in id selectors (https://mathiasbynens.be/notes/css-escapes).
    * @example
    * Here are a few examples:
    *
    * - `.title`
    * - `.content:first-child`
    * - `#marker`
-   * - `#marker~with~symbols`
-   * - `#marker.with.dot`: selects `id="marker.with.dot"`, not `class="with dot" id="marker"`
+   * - `#marker\~with\~symbols`
+   * - `#marker.with.dot`: selects `class="with dot" id="marker"`, not `id="marker.with.dot"`
    *
    */
   selector: string