8000 ✨ Custom router event target by jsimck · Pull Request #606 · seznam/ima · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

✨ Custom router event target #606

New issue

Have a question about this project? Sign up for a free GitHub ac 10000 count 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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

✨ Custom router event target #606

wants to merge 1 commit into from

Conversation

jsimck
Copy link
Contributor
@jsimck jsimck commented Feb 10, 2025

No description provided.

Copy link
changeset-bot bot commented Feb 10, 2025

🦋 Changeset detected

Latest commit: 35b7f47

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@ima/storybook-integration Patch
@ima/core Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@jsimck jsimck self-assigned this Feb 10, 2025
@jsimck jsimck requested a review from mjancarik February 10, 2025 11:00
@jsimck jsimck changed the title feat: Custom router event target ✨ Custom router event target Feb 19, 2025
By default, the router listens for navigation events (clicks on links and browser history changes) on the window object. However, you can also specify custom elements to listen on within the initialization function in `main.js`:

```javascript
const router = oc.get('$Router');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Příklad je chybný, protože oc a document nejsou v main.js dostupné.

ima
.onLoad()
.then(() => {
ima.reviveClientApp(getInitialAppConfigFunctions(), appRoot);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const appRoot = document.querySelector('#my-app-root');

ima.reviveClientApp(getInitialAppConfigFunctions(), appRoot);

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

Successfully merging this pull request may close these issues.

2 participants
0