Skip to content

Commit

Permalink
add js
Browse files Browse the repository at this point in the history
  • Loading branch information
aetonsi committed Jan 2, 2024
1 parent 951e03f commit 8ef1a54
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions dev/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Concepts that a programmer should have knowledge of.
## Web development

- [php knowledge](php)
- [JavaScript knowledge](js/README.md)

## Shell / Scripting / Desktop development

Expand Down
14 changes: 14 additions & 0 deletions dev/js/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# JavaScript knowledge

Useful notions for JS developers.

## Snippets

### Select all text of an element

Cross platform solution.

```JavaScript
element.select?.() || // all browsers except safari mobile
element.setSelectionRange(0, element.value.length) // safari mobile
```

0 comments on commit 8ef1a54

Please sign in to comment.