Evil Firefox Error — “A parameter or an operation is not supported by the underlying object”

前端 未结 6 1680
忘了有多久
忘了有多久 2021-02-05 03:33

I\'m trying to figure out what is going on here. I\'ve been at it for hours now and can\'t seem to get a grip on why this is happening.

I\'m making a few AJAX calls, and

6条回答
  •  逝去的感伤
    2021-02-05 03:51

    Since this is the first duckduckgo result for InvalidAccessError: A parameter or an operation is not supported by the underlying object I will add another source for this.

    If you deal with such error when doing iframe/window actions, then you're probably prevented by the iframe's sandbox attribute (see https://html.spec.whatwg.org/multipage/iframe-embed-object.html#attr-iframe-sandbox ) even when being on the same origin.

    In my case, an iframe was trying to do a window.top.location.href = ... after a form submission success. The allow-top-navigation sandbox option is mandatory to do so. Funny thing, this sandbox option is not mandatory to reload the top browsing context... it's only required for navigating in it.

提交回复
热议问题