You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue came up in reference to #311. The intention is that the user updates the code to call cancelUnbindAll right after removeChild.
This works under native custom elements but not when using the polyfill. This is because the polyfill uses mutation observers to notice changes and they are asynchronous. Therefore, the user must call CustomElements.takeRecords() before cancelUnbindAll to force the CustomElements polyfill to see the change and process the leftViewCallback on the removed element. This is a problem because the code is polyfill aware.
We could improve this by: (1) making a preserveBindings property on polymer elements that would prevent unbindAll from being called, or (2) making cancelUnbindAll call CustomElements.takeRecords.
The text was updated successfully, but these errors were encountered:
Here's where we landed on this. There's a preventDispose property on polymer elements. If set to true then elements will not unbind when they are removed from the document.
This issue came up in reference to #311. The intention is that the user updates the code to call cancelUnbindAll right after removeChild.
This works under native custom elements but not when using the polyfill. This is because the polyfill uses mutation observers to notice changes and they are asynchronous. Therefore, the user must call CustomElements.takeRecords() before cancelUnbindAll to force the CustomElements polyfill to see the change and process the leftViewCallback on the removed element. This is a problem because the code is polyfill aware.
We could improve this by: (1) making a preserveBindings property on polymer elements that would prevent unbindAll from being called, or (2) making cancelUnbindAll call CustomElements.takeRecords.
The text was updated successfully, but these errors were encountered: