Skip to content

Blocking JSON breaks web compat #43

@farre

Description

@farre

We've had this happen in the wild:

function loadScript(e,t,o){
    var n=document.getElementsByTagName("script")[0],
        a=document.createElement("script");
    a.type="text/javascript",a.src=e,o&&(a.onerror=o),n.parentNode.insertBefore(a,n.nextSibling),t&&t()
    }

loadScript(
  _data.source.base+_data.source.groups,
  null,
  function(){
    initErrors("Error."),
    _data.source.error=!0
  }
)

where the script to be loaded is proper JSON.

This means that we would block with ORB, and expose this through onerror. This has the unfortunate effect to break the site if the onerror handler actually sees this as a terminal error (which is what we've seen).

We're aiming to handle this the way we're currently handling Window.fetch, namely that we're going to clear the body of the internal response, but allow the load. This is a work-around, but I wonder if this is how we should spec this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions