Skip to content
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

add wrapper ClassName // DOM_CONTENT_UPDATED #3425

Closed
wants to merge 1 commit into from

Conversation

bugsounet
Copy link
Contributor

@bugsounet bugsounet commented Apr 18, 2024

Added:

  • DOM_CONTENT_UPDATED notification when a module is updated with updateDom() to do better
  • set className for njk wrapper:
    • There is no class name to the main wrapper of the module and It's dificult to identify it
    • ---> define it to <module_name>-njk

Idea:
Add a callback option in updateDom()

  if (typeof updateOptions?.options?.callback === "function") {
    updateOptions.options.callback();
    //module.notificationReceived("DOM_CONTENT_UPDATED",null,null))
  }

can be used with:

this.updateDom({options: { speed: 2, callback: () => this.checkInactive()}});

@sdetweil
Copy link
Collaborator

jeez that sounds like a lot of waste.. notifications on every dom update.. WHY? what is the use case?

If YOU need to know put a change event on the node

@sdetweil
Copy link
Collaborator

see the Observer and Mutation events
https://stackoverflow.com/questions/3219758/detect-changes-in-the-dom

@bugsounet
Copy link
Contributor Author

really ? ... and with njk ?

@bugsounet bugsounet marked this pull request as draft April 18, 2024 23:15
@bugsounet
Copy link
Contributor Author

Closed: not need because #3426 is close

@bugsounet bugsounet closed this Apr 19, 2024
@bugsounet bugsounet deleted the njk branch April 19, 2024 09:37
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.

None yet

2 participants