question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug in Firefox "TypeError: access to strict mode ..."

See original GitHub issue

Hi,

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:closed
  • Created 7 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
YerkoPalmacommented, Sep 17, 2016

I finally choose to use the yo-yoify option and it worked perfectly for me.

1reaction
shamacommented, Sep 17, 2016
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found