|
Last change
on this file since e4c61dd was e4c61dd, checked in by istevanoska <ilinastevanoska@…>, 6 months ago |
|
Prototype 1.1
|
-
Property mode
set to
100644
|
|
File size:
262 bytes
|
| Line | |
|---|
| 1 | import {Selection, root} from "./selection/index.js";
|
|---|
| 2 |
|
|---|
| 3 | export default function(selector) {
|
|---|
| 4 | return typeof selector === "string"
|
|---|
| 5 | ? new Selection([[document.querySelector(selector)]], [document.documentElement])
|
|---|
| 6 | : new Selection([[selector]], root);
|
|---|
| 7 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.