Skip to content
This repository has been archived by the owner on Sep 12, 2023. It is now read-only.

Adding options and observerElement #7

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

tnylea
Copy link

@tnylea tnylea commented Jun 22, 2021

Hey Marcel 👋,

I've gone ahead and added an option for oberserverElement.

I added this to the main.js file, where it will merge a default options object with window.tailwindOptions. This will allow the ability for us to add even more options down the road.

If there is a more efficient way that you feel that I should implement this, let me know.

For now, if you include:

window.tailwindOptions = {
    observerElement: document.getElementById('app')
};

above the CDN script tag, you can define the element that you want the JIT CDN to observe.

Thanks again for this awesome script ;)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant