Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-hubspot-form

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-hubspot-form - npm Package Compare versions

Comparing version 1.0.5 to 1.1.1

29

dist/index.js

@@ -41,4 +41,3 @@ 'use strict';

_this.createForm = _this.createForm.bind(_this);
_this.createFormInterval = _this.createFormInterval.bind(_this);
_this.loadScript = _this.loadScript.bind(_this);
_this.findFormElement = _this.findFormElement.bind(_this);
return _this;

@@ -48,9 +47,2 @@ }

_createClass(HubspotForm, [{
key: 'createFormInterval',
value: function createFormInterval() {
if (!this.createForm()) {
setTimeout(this.createForm, 1);
}
}
}, {
key: 'createForm',

@@ -63,3 +55,6 @@ value: function createForm() {

window.hbspt.forms.create(options);
this.findFormElement();
return true;
} else {
setTimeout(this.createForm, 1);
}

@@ -77,2 +72,12 @@ }

}, {
key: 'findFormElement',
value: function findFormElement() {
var form = this.el.querySelector('form');
if (form) {
form.addEventListener('submit', this.props.onSubmit);
} else {
setTimeout(this.findFormElement, 1);
}
}
}, {
key: 'componentDidMount',

@@ -83,3 +88,3 @@ value: function componentDidMount() {

} else {
this.createFormInterval();
this.createForm();
}

@@ -101,2 +106,6 @@ }

HubspotForm.defaultProps = {
onSubmit: function onSubmit() {}
};
exports.default = HubspotForm;

@@ -103,0 +112,0 @@ module.exports = exports['default'];

{
"name": "react-hubspot-form",
"version": "1.0.5",
"version": "1.1.1",
"keywords": [

@@ -21,2 +21,3 @@ "react",

"prepublishOnly": "npm run build",
"test": "echo 'no test'",
"travis": "opn https://travis-ci.org/escaladesports/react-hubspot-form/branches"

@@ -23,0 +24,0 @@ },

@@ -28,3 +28,4 @@ # react-hubspot-form

portalId='your_portal_id'
formId='your_form_id'
formId='your_form_id'
onSubmit={() => console.log('Submit!')}
/>

@@ -31,0 +32,0 @@ ```

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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