-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vanilla #14
Merged
Merged
Vanilla #14
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces another file that can be imported in environments where the
document
andwindow
are not set. For example, the default import which also includes Stimulus and initializes it is still like this,While if someone wants to exclude Stimulus from starting, they can import the vanilla that only initializes Hellotext.js via
Session Assignments
This PR allows developers to set the value of the session when initializing the library. Maybe the session was retrieved from another system and the developers wants to reuse that. If that's the case, it's possible to add it as a config parameter.
When the value is present Hellotext uses that without dispatching
session-set
events, otherwise it creates a new one.Conditional Document accesses
The
Cookie
class always assumed the presence of thedocument
object, which would have raised issues in non-browser environments, i.e running in a Node.js environment. For this reason, the Cookie class only attempts to set or get values from the document's cookie when the object is defined.