You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One issue with the moduleChange event is that it is dispatched at the beginning of the module change process.
For example, let's say a user is switching from module "A" to module "B" and I want to make some modifications to the nodes on "B" when this module change event occurs. Right now this is not possible as the nodes haven't been loaded yet. Searching for node in B using it's classname (document.querySelector(classname)) returns null.
It can be articulated further into two events like moduleWillChange and moduleDidChange which will provide a finer controller over this event
The text was updated successfully, but these errors were encountered:
Nevermind, I think I found out what the issue is. I was using mutations to add classnames based on #180
The mutation events were happening after the moduleChange event is fired. Hence the document.querySelector was returning null. My bad.
One issue with the
moduleChange
event is that it is dispatched at the beginning of the module change process.For example, let's say a user is switching from module "A" to module "B" and I want to make some modifications to the nodes on "B" when this module change event occurs. Right now this is not possible as the nodes haven't been loaded yet. Searching for node in B using it's classname (
document.querySelector(classname)
) returns null.It can be articulated further into two events like
moduleWillChange
andmoduleDidChange
which will provide a finer controller over this eventThe text was updated successfully, but these errors were encountered: