@tosspayments/brandpay-sdk
Advanced tools
Comparing version 1.5.2 to 1.5.3-alpha.0
@@ -26,10 +26,17 @@ 'use strict'; | ||
cachedPromise = new Promise(function (resolve, reject) { | ||
document.head.appendChild(script); | ||
window.addEventListener("TossPayments:initialize:".concat(namespace), function () { | ||
if (getNamespace(namespace) !== undefined) { | ||
resolve(getNamespace(namespace)); | ||
script.onload = function () { | ||
var loadedNamespace = getNamespace(namespace); | ||
if (loadedNamespace !== undefined) { | ||
resolve(loadedNamespace); | ||
} else { | ||
reject(new Error("[TossPayments SDK] Failed to load script: [".concat(src, "]"))); | ||
} | ||
}); | ||
}; | ||
script.onerror = function () { | ||
reject(new Error("[TossPayments SDK] Failed to load script: [".concat(src, "]"))); | ||
}; | ||
document.head.appendChild(script); | ||
}); | ||
@@ -36,0 +43,0 @@ return cachedPromise; |
@@ -22,10 +22,17 @@ var cachedPromise; | ||
cachedPromise = new Promise(function (resolve, reject) { | ||
document.head.appendChild(script); | ||
window.addEventListener("TossPayments:initialize:".concat(namespace), function () { | ||
if (getNamespace(namespace) !== undefined) { | ||
resolve(getNamespace(namespace)); | ||
script.onload = function () { | ||
var loadedNamespace = getNamespace(namespace); | ||
if (loadedNamespace !== undefined) { | ||
resolve(loadedNamespace); | ||
} else { | ||
reject(new Error("[TossPayments SDK] Failed to load script: [".concat(src, "]"))); | ||
} | ||
}); | ||
}; | ||
script.onerror = function () { | ||
reject(new Error("[TossPayments SDK] Failed to load script: [".concat(src, "]"))); | ||
}; | ||
document.head.appendChild(script); | ||
}); | ||
@@ -32,0 +39,0 @@ return cachedPromise; |
{ | ||
"name": "@tosspayments/brandpay-sdk", | ||
"description": "TossPayments.js Brand Pay SDK", | ||
"version": "1.5.2", | ||
"version": "1.5.3-alpha.0", | ||
"main": "dist/index.cjs.js", | ||
@@ -23,3 +23,3 @@ "module": "dist/index.esm.js", | ||
"@rollup/plugin-typescript": "^8.3.0", | ||
"@tosspayments/sdk-loader": "1.2.0", | ||
"@tosspayments/sdk-loader": "1.2.1-alpha.0", | ||
"@types/jest": "^27.0.0", | ||
@@ -44,3 +44,3 @@ "jest": "^27.0.7", | ||
}, | ||
"gitHead": "71537bfebcd17e1108a1d796b7cf955e2259c4cf" | ||
"gitHead": "61a4736909d1d7df660bb2af567ed46567961e9c" | ||
} |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
17713
132
2
1