Skip to content

Commit c731aab

Browse files
committed
feat: $innerWidth and $innerHeight operators
1 parent 1564c34 commit c731aab

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/getAttribute.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ Element.prototype.getAttribute = function (name) {
1313
value = localStorage.getItem('clientId')
1414
else if (value === '$session_id')
1515
value = localStorage.getItem('session_id')
16+
else if (value === '$innerWidth')
17+
value = window.innerWidth
18+
else if (value === '$innerHeight')
19+
value = window.innerHeight
1620
else if (typeof value === 'string') {
1721
if (value.startsWith('$search')) {
1822
const searchParams = new URLSearchParams(window.location.search);

0 commit comments

Comments
 (0)