Skip to content
This repository has been archived by the owner on Nov 6, 2024. It is now read-only.

[fix] "script.dataset" is undefind in IE10 #67

Merged
merged 3 commits into from
Jan 2, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/esri-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function createScript(url) {
script.type = 'text/javascript';
script.src = url;
// TODO: remove this if no longer needed
script.dataset['esriLoader'] = 'loading';
script.setAttribute('data-esri-loader', 'loading');
return script;
}

Expand Down Expand Up @@ -138,7 +138,7 @@ export function loadScript(options: ILoadScriptOptions = {}): Promise<HTMLScript
// handleScriptLoad(script, resolve, reject);
handleScriptLoad(script, () => {
// update the status of the script
script.dataset['esriLoader'] = 'loaded';
script.setAttribute('data-esri-loader', 'loaded');
// return the script
resolve(script);
}, reject);
Expand Down Expand Up @@ -202,7 +202,7 @@ export function bootstrap(callback?: (error: Error, dojoRequire?: any) => void,
// once the script is loaded...
script.onload = () => {
// update the status of the script
script.dataset['esriLoader'] = 'loaded';
script.setAttribute('data-esri-loader', 'loaded');

// we can now use Dojo's require() to load esri and dojo AMD modules
const _dojoRequire = window['require'];
Expand Down