Socket
Socket
Sign inDemoInstall

inputmask

Package Overview
Dependencies
Maintainers
1
Versions
189
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inputmask - npm Package Compare versions

Comparing version 5.0.9-beta.38 to 5.0.9-beta.39

1

Changelog.md

@@ -14,2 +14,3 @@ # Change Log

### Fixed
- how to get value from input-mask element? #2702
- Problem with seconds in format 'HH:MM:ss' #2745

@@ -16,0 +17,0 @@ - Remove unused mask - Take2 #2748

52

lib/inputmaskElement.js

@@ -9,25 +9,37 @@ import window from "./global/window";

if (document && document.head && document.head.attachShadow && window.customElements && window.customElements.get("input-mask") === undefined) {
class InputmaskElement extends HTMLElement {
constructor() {
super();
var attributeNames = this.getAttributeNames(),
shadow = this.attachShadow({mode: "closed"}),
input = document.createElement("input");
input.type = "text";
shadow.appendChild(input);
class InputmaskElement extends HTMLElement {
constructor() {
super();
var attributeNames = this.getAttributeNames(),
shadow = this.attachShadow({mode: "closed"});
this.input = document.createElement("input");
this.input.type = "text";
shadow.appendChild(this.input);
for (var attr in attributeNames) {
if (Object.prototype.hasOwnProperty.call(attributeNames, attr)) {
input.setAttribute(attributeNames[attr], this.getAttribute(attributeNames[attr]));
}
}
for (var attr in attributeNames) {
if (Object.prototype.hasOwnProperty.call(attributeNames, attr)) {
this.input.setAttribute(attributeNames[attr], this.getAttribute(attributeNames[attr]));
}
}
var im = new Inputmask();
im.dataAttribute = "";
im.mask(input);
input.inputmask.shadowRoot = shadow; //make the shadowRoot available
}
}
var im = new Inputmask();
im.dataAttribute = "";
im.mask(this.input);
im.shadowRoot = shadow; //make the shadowRoot available
}
window.customElements.define("input-mask", InputmaskElement);
attributeChangedCallback(attrName, oldVal, newVal) {
this.input.setAttribute(attrName, newVal);
}
//bind value
get value() {
return this.input.value;
}
set value(value) {
this.input.value = value;
}
}
window.customElements.define("input-mask", InputmaskElement);
}
{
"name": "inputmask",
"version": "5.0.9-beta.38",
"version": "5.0.9-beta.39",
"description": "Inputmask is a javascript library which creates an input mask. Inputmask can run against vanilla javascript, jQuery and jqlite.",

@@ -5,0 +5,0 @@ "main": "dist/inputmask.js",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc