Skip to content

Commit 4e251e4

Browse files
authored
example of getUrlParameter
Somehow get getUrlParameter() isn't documented
1 parent 947bb38 commit 4e251e4

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

‎docs/core/utils.md‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,3 +205,18 @@ AFRAME.registerComponent('foo', {
205205
tick: function (t, dt) {}
206206
});
207207
```
208+
209+
210+
## Web Utils
211+
212+
### `AFRAME.utils.getUrlParameter ( name )`
213+
214+
Returns the value of a URL parameter as a string otherwise returns an empty string.
215+
216+
217+
```js
218+
// visiting the current page with ?testing=aframe
219+
var testing = AFRAME.utils.getUrlParameter ( "testing" );
220+
console.log(testing)
221+
// will return "aframe"
222+
```

0 commit comments

Comments
 (0)