Skip to content
Snippets Groups Projects
Commit 65262c5e authored by Samuel Degueldre's avatar Samuel Degueldre Committed by qsm-odoo
Browse files

[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
parent ae9c2487
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment