How to fix
Replace the problem line with the new one:
.prop('href', element.src)
Description
The element
is a HTMLIFrameElement
, it does not have the prop()
method, but had the src
property.
See Also: GitHub Pull Request #4022
https://github.com/magento/magento2/pull/4022
I have the latest version of Magento 2, and when I add my own iframe to a block, I get the exact same error. Also, the code in my version looks like
.prop('href', element.prop('src'))
So I’ll have to change it to the suggested code above
.prop('href', element.src)
Let’s see if this fixes it
And now the bug has disappeared after applying the patch to page-cache.js located in /vendor/magento/module-page-cache/view/frontend/web/js/
Is this really a bug it only happens when I loaded external libraries with requireJs.
Indeed I apply this patch and it fixes the error on Magento 2.1.4 .
Thank you.
It has been fixed on 2017-02-17 in the Magento 2.2 development branch: