summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorSamuel Degueldre <sad@odoo.com>2019-12-03 08:17:37 +0000
committerqsm-odoo <qsm@odoo.com>2019-12-06 09:45:30 +0000
commit65262c5e3e1550e4dfe6d6629af532dda6cc240f (patch)
treefb0ebf1390c3b7bc3d41ac85da1dffcb303deb4a /addons/web/static/src
parentae9c2487c8883c118977950642971f8a21609869 (diff)
[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
Diffstat (limited to 'addons/web/static/src')
0 files changed, 0 insertions, 0 deletions