-
- Downloads
[IMP] web_editor: allow options to target subelements of a snippet
Add the ability for a snippet option's method to target multiple subelements of the option's $target using the data-apply-to attribute with a jQuery selector. This is achieved by calling the method on a proxy of the object where accesses to the $target are redirected to a different object. While it may seem preferable to just set the $target before calling the method and restoring it after the call, as this would be much simpler code, it is not possible as this breaks down under asynchronous conditions, hence the need to operate on a proxy such that all concurrent asynchronous operations have their own independent $target available for their entire time of execution. Part of https://github.com/odoo/odoo/pull/41402
Loading
Please register or sign in to comment