-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Uncaught TypeError: MutationObserver.observe: Argument 1 is not an object #4566
Comments
You can use the layout hook system to add a view component just as described here: https://docs.abp.io/en/abp/latest/UI/AspNetCore/Customization-User-Interface#layout-hooks
I didn't undestand how this will help you. When you use |
Hi @hikalkan,
Unfortunately this doesn't solve the main issue. DevExtreme requires to be loaded in the
When having a My current wip layout is created like this: <head>
@await Component.InvokeLayoutHookAsync(LayoutHooks.Head.First, StandardLayouts.Application)
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>@pageTitle</title>
<abp-style-bundle name="@LuiThemeBundles.Styles.Global" />
<abp-script-bundle name="@LuiThemeBundles.Scripts.Layout" />
<!-- This is where just devextreme and it's dependencies should be included (without abp.jquery.js) -->
<abp-script-bundle name="@LuiThemeBundles.Scripts.DevExtreme" />
@await Component.InvokeAsync(typeof(WidgetStylesViewComponent))
@await RenderSectionAsync("styles", false)
@await Component.InvokeLayoutHookAsync(LayoutHooks.Head.Last, StandardLayouts.Application)
</head>
<body class="lui-main dx-viewport @rtl">
@await Component.InvokeLayoutHookAsync(LayoutHooks.Body.First, StandardLayouts.Application)
<!-- code omitted... -->
@{ RenderContent(); }
<!-- abp.jquery.js should be included with the default script contributors here -->
<abp-script-bundle name="@LuiThemeBundles.Scripts.Global" />
<script src="~/Abp/ApplicationConfigurationScript"></script>
<script src="~/Abp/ServiceProxyScript"></script>
@await Component.InvokeAsync(typeof(WidgetScriptsViewComponent))
@await RenderSectionAsync("scripts", false)
@await Component.InvokeLayoutHookAsync(LayoutHooks.Body.Last, StandardLayouts.Application)
</body> |
abp.jquery.js
The problem was we had try to find the |
Hi,
I'm working on integrating devextreme into a convenience abp module.
Devextreme and it's dependencies (which include jQuery) require to be loaded in the
head
section, before using any DevExtreme components.When using the built-in
JQueryScriptContributor
, it includes theabp.jquery.js
file which tries to initialize theMutationObserver
. Since the body isn't available yet, it throws aUncaught TypeError
in the console:Uncaught TypeError: MutationObserver.observe: Argument 1 is not an object.
Consider extracting
abp.jquery.js
into a separate bundle contributor, so developers can use just jquery.Currently I'm using the following workaround:
This contributor get's added in the
head
section, while other scripts stay in the bottom.The text was updated successfully, but these errors were encountered: