Skip to content
This repository was archived by the owner on Apr 16, 2019. It is now read-only.
This repository was archived by the owner on Apr 16, 2019. It is now read-only.

CANNOT get a cross-domain script via $.ajax({ type: 'script'}). #607

@LeoYuan

Description

@LeoYuan

bug description

you will get an cross-domain error when using $.ajax({type: 'script'}) to get script, 'cause the code always create a XHR object to send requests.

how to reproduce?

af.ajax({
      url: 'https://ehr.alibaba-inc.com/assets/masterdata/employee/lib/lodash.min.js',
      dataType: 'script',
      success: function() {
             console.log('loaded');
      }
})

how to fix?

create a script tag to load script.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions