Skip to content

Commit

Permalink
feat: $innerWidth and $innerHeight operators
Browse files Browse the repository at this point in the history
  • Loading branch information
frankpagan committed Feb 18, 2024
1 parent 1564c34 commit c731aab
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/getAttribute.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ Element.prototype.getAttribute = function (name) {
value = localStorage.getItem('clientId')
else if (value === '$session_id')
value = localStorage.getItem('session_id')
else if (value === '$innerWidth')
value = window.innerWidth
else if (value === '$innerHeight')
value = window.innerHeight
else if (typeof value === 'string') {
if (value.startsWith('$search')) {
const searchParams = new URLSearchParams(window.location.search);
Expand Down

0 comments on commit c731aab

Please sign in to comment.