John-Philip Johansson
Mar 13, 2018
(2 votes)

"domUpdated" is no longer needed (BETA) (CMS UI 11.4.0)

You can read more about how you enable Beta features in the documentation.

In CMS UI 11.2.0 we introduced the "beta/domUpdated" message that refreshes the On-Page Editing (OPE) overlays. Based on feedback we received at presentations and on Github, we are now watching the view for changes to DOM elements with the "data-epi-property-name" property. You no longer need to do this:


If the DOM changes so that there are new elements with data-epi-property-name, or existing elements change their value to another property name, then the overlays automatically gets updated.

Previous considerations

As mentioned in the previous post, there were two reasons to introduce a message instead of automatically refreshing:

1. UI becomes unresponsive as the spamming is ongoing
2. Memory usage increases

There was also a third reason:

3. Giving you control of when to refresh, as to minimize 1 and 2.

But reason 3. seems like it just lead to boilerplate code that many would rather avoid, and we had already made changes to minimize the impact of 1. and 2., so when we got the question "can't it just 'work'?" we decided to make this change. The overlays will update by themselves now.

Image after.gif


The main benefit is that it's now easier for a partner to make great client-side rendered UI's that still work nicely in OPE. That also makes our communication around features like this easier, because you don't have to do anything. cool 

Code on Github

Please contribute to these repos to help each other with how to work with OPE and your favourite JavaScript framework!

The example in our React sample repo has been updated to remove the "beta/domUpdated" code:

Please contribute an example to the AngularJS repo:

Mar 13, 2018


Please login to comment.
Latest blogs
Conversion Rate Optimization: Maximizing ROI through Data-Driven Decisions

In today's digital landscape, businesses are constantly looking for ways to improve their online presence and drive more conversions. One effective...

JessWade | Jun 1, 2023

Enhance Your Writing with Suggestions

Are you tired of staring at a blank screen, struggling to find the right words? The Epicweb.Optimizely.AIAssistant Addon is here to revolutionize...

Luc Gosso (MVP) | May 31, 2023 | Syndicated blog

Content Graph - Letting GraphQL do all the hard work for you

Background As we have seen before, setting up Content Graph on the CMS side is pretty easy. However, when it comes to the “head” part of the setup,...

Kunal Shetye | May 26, 2023 | Syndicated blog

Improved headless functionality in Customized Commerce

Did you know that with the release of Content Delivery Commerce API 3.7 we have massively improved the out of the box headless capabilities of...

Marcus Hoffmann | May 25, 2023