adobe / adobe/pdf-embed-api-samples

Cannot load api via jquery getScript()

Open
#40 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
235
Forks
140
PR merge metrics
No merged PRs in 30d

Description

### Expected Behaviour

Use jquery getScript() to load the API at run time when needed, the script is loaded and the `adobe_dc_view_sdk.ready` event is fired.

### Actual Behaviour

An unhandled javascript exception occurs: `TypeError: Cannot read properties of undefined (reading 'src') at loadSDKScript`

#### Sample Code that illustrates the problem

https://jsfiddle.net/redtopia/o3m689sg/6/ (view the console to see the exception)

The following fiddle fixes the issue by loading the script with vanilla javascript

https://jsfiddle.net/redtopia/Lyqdj2zm/6/

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.