Skip to content

Commit

Permalink
Merge pull request #2 from rbonestell/bug/dynamic-element-root-bug
Browse files Browse the repository at this point in the history
bug: Dynamic elements root attribute fix
  • Loading branch information
rbonestell authored Feb 15, 2025
2 parents 920ae69 + 38c0268 commit 2d7b98f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "retroify.js",
"version": "0.2.0",
"version": "0.2.1",
"description": "A library to apply retro 8-bit styling to web pages",
"repository": {
"type": "git",
Expand Down
8 changes: 4 additions & 4 deletions src/retroify.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* retroify.js v0.2.0
* retroify.js v0.2.1
* A library to apply retro 8-bit styling to web pages
* https://github.com/rbonestell/retroify.js
*
Expand Down Expand Up @@ -308,7 +308,7 @@
}

const Retroify = {
version: '0.2.0',
version: '0.2.1',

/**
* Check if the environment supports Retroify
Expand Down Expand Up @@ -357,8 +357,6 @@
element.setAttribute('aria-pressed', 'false');
}

element.setAttribute('data-retroify-root', 'true');

// Skip applying retroify to blacklist element tags
const selector = `*:not(${BLACKLISTED_TAGS.join(', ')})`;

Expand Down Expand Up @@ -398,6 +396,8 @@
throw new Error('Invalid target type. Expected HTMLElement or string selector');
}

rootElement.setAttribute('data-retroify-root', 'true');

// Apply retroify to the target element
applyToTargetElement(rootElement);

Expand Down

0 comments on commit 2d7b98f

Please sign in to comment.