Bug in Firefox "TypeError: access to strict mode ..."
See original GitHub issueHi,
I’m getting the following error when trying to add an onload handler to a nested element.
TypeError: access to strict mode caller function is censored
Is this expected behavior? The line triggering this error seems to be https://github.com/shama/bel/blob/master/index.js#L68 Tested on Ubuntu / Firefox 48.0 Seems to work fine on Ubuntu / Google Chrome 52.0.2743.116 (64-bit)
Below is a minimal example reproducing the error.
import bel from 'bel'
const renderObj = ({name, x, y}) => {
return bel `<g transform="translate(${x}, ${y})" class="task" onload=${e => console.log(e) }>
<rect width=100 height=100 />
<text>${name}</text>
</g>`
}
const objs = [
{name:'foo', x:100, y:100}
];
const svg = bel`<svg onclick=${onclick}>
${objs.map(t => renderObj(t))}
</svg>`
document.appendChild(svg);
Kind regards, Melle
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
TypeError: access to strict mode caller function is censored
The problem was due to "use strict"; code in the dynamically generated file which will be present in every client who logs into...
Read more >The cause for TypeError: access to strict mode caller function ...
What's happening is that code that tries to use the caller property of a function is being called by strict-mode code. Example:.
Read more >AjaxManager, Firefox gives -TypeError: access to strict mode..
Error in Firefox - works just fine in Chrome, Edge and IE. TypeError: access to strict mode caller function is censored.
Read more >Issue with MicrosoftAjaxWebForms.js and firefox TypeError ...
Issue with MicrosoftAjaxWebForms.js and firefox TypeError: access to strict mode caller function is censored #462.
Read more >WTF! MicrosoftAjax.js vs 'use strict' vs Firefox vs IE
I fixed a very weird bug today. Initially the bug was raised that some actions causes JavaScript error in Firefox: 1. TypeError: access...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I finally choose to use the
yo-yoify
option and it worked perfectly for me.Please see https://github.com/shama/bel/issues/39#issuecomment-232776543