Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Add a section on alternative syntax per issue WICG#15.
  • Loading branch information
Nick Burris authored Aug 7, 2019
1 parent 19a4ae6 commit 7fe60e1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,15 @@ Here is a __Superduper unique__ string

</td></tr></table>

#### Alternative syntax
A problem with using the URL fragment to specify targetText is that some sites rely on the URL fragment for routing/state, see [issue #15](https://github.com/WICG/ScrollToTextFragment/issues/15). This can be solved by specifying a delimiter to be used to separate the targetText from the rest of the URL fragment, for example a double-hash syntax:

```
https://example.com##targetText=example
https://example.com#state##targetText=example
```

The browser can then strip off the ##targetText part of the URL fragment, only exposing the part of the URL fragment preceding ## to the site.

### Processing Model

Expand Down

0 comments on commit 7fe60e1

Please sign in to comment.