@ideal-postcodes/jsutil
Advanced tools
Comparing version 6.1.0 to 6.2.0
@@ -0,1 +1,8 @@ | ||
# [6.2.0](https://github.com/ideal-postcodes/jsutil/compare/6.1.0...6.2.0) (2023-07-19) | ||
### Features | ||
* **types:** Add additional types check for htmlelements ([6a07612](https://github.com/ideal-postcodes/jsutil/commit/6a076129c0145ac4eb52f51f36f4e4c86c29621d)) | ||
# [6.1.0](https://github.com/ideal-postcodes/jsutil/compare/6.0.0...6.1.0) (2022-08-08) | ||
@@ -2,0 +9,0 @@ |
@@ -62,3 +62,3 @@ "use strict"; | ||
const getDocument = (scope) => { | ||
if (scope instanceof Document) | ||
if (scope instanceof Document || scope.constructor.name === "HTMLDocument") | ||
return scope; | ||
@@ -65,0 +65,0 @@ if (scope.ownerDocument) |
@@ -8,3 +8,3 @@ "use strict"; | ||
return false; | ||
return e instanceof HTMLSelectElement; | ||
return e instanceof HTMLSelectElement || e.constructor.name === "HTMLSelectElement"; | ||
}; | ||
@@ -15,3 +15,3 @@ exports.isSelect = isSelect; | ||
return false; | ||
return e instanceof HTMLInputElement; | ||
return e instanceof HTMLInputElement || e.constructor.name === "HTMLInputElement"; | ||
}; | ||
@@ -22,3 +22,3 @@ exports.isInput = isInput; | ||
return false; | ||
return e instanceof HTMLTextAreaElement; | ||
return e instanceof HTMLTextAreaElement || e.constructor.name === "HTMLTextAreaElement"; | ||
}; | ||
@@ -25,0 +25,0 @@ exports.isTextarea = isTextarea; |
@@ -49,3 +49,3 @@ import { isString } from "./string"; | ||
export const getDocument = (scope) => { | ||
if (scope instanceof Document) | ||
if (scope instanceof Document || scope.constructor.name === "HTMLDocument") | ||
return scope; | ||
@@ -52,0 +52,0 @@ if (scope.ownerDocument) |
@@ -5,3 +5,3 @@ import { trigger } from "./event"; | ||
return false; | ||
return e instanceof HTMLSelectElement; | ||
return e instanceof HTMLSelectElement || e.constructor.name === "HTMLSelectElement"; | ||
}; | ||
@@ -11,3 +11,3 @@ export const isInput = (e) => { | ||
return false; | ||
return e instanceof HTMLInputElement; | ||
return e instanceof HTMLInputElement || e.constructor.name === "HTMLInputElement"; | ||
}; | ||
@@ -17,3 +17,3 @@ export const isTextarea = (e) => { | ||
return false; | ||
return e instanceof HTMLTextAreaElement; | ||
return e instanceof HTMLTextAreaElement || e.constructor.name === "HTMLTextAreaElement"; | ||
}; | ||
@@ -20,0 +20,0 @@ export const update = (input, value, skipTrigger = false) => { |
{ | ||
"name": "@ideal-postcodes/jsutil", | ||
"version": "6.1.0", | ||
"version": "6.2.0", | ||
"description": "Browser Address Autocomplete for api.ideal-postcodes.co.uk", | ||
@@ -5,0 +5,0 @@ "author": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
106543