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

dom-lib

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dom-lib - npm Package Compare versions

Comparing version 1.0.0-beta.1 to 1.0.0

14

lib/index.js

@@ -6,3 +6,3 @@ 'use strict';

});
exports.WheelHandler = exports.DOMMouseMoveTracker = exports.BrowserSupportCore = exports.getVendorPrefixedName = exports.animation = exports.translateDOMPositionXY = exports.transition = undefined;
exports.WheelHandler = exports.DOMMouseMoveTracker = exports.BrowserSupportCore = exports.getVendorPrefixedName = exports.translateDOMPositionXY = exports.transition = exports.animation = undefined;

@@ -57,2 +57,6 @@ var _classNames = require('./classNames');

var _animation2 = require('./animation');
var _animation = _interopRequireWildcard(_animation2);
var _transition2 = require('./transition');

@@ -66,6 +70,2 @@

var _animation2 = require('./animation');
var _animation3 = _interopRequireDefault(_animation2);
var _getVendorPrefixedName2 = require('./getVendorPrefixedName');

@@ -89,5 +89,7 @@

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
exports.animation = _animation;
exports.transition = _transition3.default;
exports.translateDOMPositionXY = _translateDOMPositionXY3.default;
exports.animation = _animation3.default;
exports.getVendorPrefixedName = _getVendorPrefixedName3.default;

@@ -94,0 +96,0 @@ exports.BrowserSupportCore = _BrowserSupportCore3.default;

@@ -36,2 +36,4 @@ 'use strict';

style[BACKFACE_VISIBILITY] = 'hidden';
return style;
};

@@ -45,2 +47,4 @@ }

style[TRANSFORM] = 'translate(' + x + 'px,' + y + 'px)';
return style;
};

@@ -55,2 +59,4 @@ }

style.top = y + 'px';
return style;
};

@@ -57,0 +63,0 @@ }();

{
"name": "dom-lib",
"version": "1.0.0-beta.1",
"version": "1.0.0",
"description": "DOM helper library",

@@ -21,3 +21,7 @@ "main": "lib/index.js",

},
"files": ["CHANGELOG.md", "src", "lib"],
"files": [
"CHANGELOG.md",
"src",
"lib"
],
"devDependencies": {

@@ -33,2 +37,3 @@ "babel-core": "^6.7.6",

"babel-preset-stage-0": "^6.5.0",
"brfs": "^1.5.0",
"chai": "^3.5.0",

@@ -35,0 +40,0 @@ "es5-shim": "^4.1.14",

@@ -28,21 +28,23 @@ # dom-lib [![Travis][build-badge]][build] [![npm][npm-badge]][npm]

Events
Style
```typescript
on: (target: HTMLElement, eventName:string, listener:Function, capture:boolean = false)=>{ off: Function }
off: (target: HTMLElement, eventName:string, listener:Function, capture:boolean = false)=>void
getStyle: (node: HTMLElement, property: string) => string;
getStyle: (node: HTMLElement) => Object;
removeStyle: (node: HTMLElement, property: string) => void;
removeStyle: (node: HTMLElement, propertys: Array<string>) => void;
addStyle: (node: HTMLElement, property: string, value: string) => void;
addStyle: (node: HTMLElement, style: Object) => void;
```
Style
Events
```js
String getStyle(node:Element, String property)
Object getStyle(node:Element)
String getComputedStyle(node:Element, String property)
Object getComputedStyle(node:Element)
void removeStyle(node:Element, String property)
void removeStyle(node:Element, Array propertys)
void addStyle(node:Element, String property, String value)
void addStyle(node:Element, Object style)
```typescript
on: (target: HTMLElement, eventName: string, listener: Function, capture: boolean = false) => {
off: Function;
};
off: (target: HTMLElement, eventName: string, listener: Function, capture: boolean = false) =>
void;
```

@@ -52,18 +54,25 @@

```js
Element activeElement()
Number getHeight(node:Element, client)
Number getWidth(node:Element, client)
Object getOffset(node:Element)
Object getOffsetParent(node:Element)
Object getPosition(node:Element, offsetParent)
String getWindow(node:Element)
String nodeName(node:Element)
Object ownerDocument(Element componentOrElement)
Object ownerWindow(Element componentOrElement)
Boolean contains(Element context, node:Element)
void scrollLeft(node:Element, Number val)
void scrollTop(node:Element, Number val)
```typescript
activeElement: () => HTMLElement;
getHeight: (node: HTMLElement, client: HTMLElement) => number;
getWidth: (node: HTMLElement, client: HTMLElement) => number;
getOffset: (node: HTMLElement) => Object;
getOffsetParent: (node: HTMLElement) => Object;
getPosition: (node: HTMLElement, offsetParent) => Object;
getWindow: (node: HTMLElement) => String;
nodeName: (node: HTMLElement) => String;
ownerDocument: (node: HTMLElement) => Object;
ownerWindow: (node: HTMLElement) => Object;
contains: (context: HTMLElement, node: HTMLElement) => boolean;
scrollLeft: (node: HTMLElement) => number;
scrollTop: (node: HTMLElement) => number;
```
Utils
```typescript
scrollLeft: (node: HTMLElement, val: number) => void;
scrollTop: (node: HTMLElement, val: number) => void;
```
[build-badge]: https://travis-ci.org/rsuite/dom-lib.svg?branch=master

@@ -70,0 +79,0 @@ [build]: https://travis-ci.org/rsuite/dom-lib

@@ -5,5 +5,5 @@ export * from './classNames';

export * from './events';
export * as animation from './animation';
export transition from './transition';
export translateDOMPositionXY from './transition/translateDOMPositionXY';
export animation from './animation';
export getVendorPrefixedName from './getVendorPrefixedName';

@@ -10,0 +10,0 @@ export BrowserSupportCore from './BrowserSupportCore';

@@ -22,2 +22,4 @@ // @flow

style[BACKFACE_VISIBILITY] = 'hidden';
return style;
};

@@ -28,2 +30,4 @@ }

style[TRANSFORM] = `translate(${x}px,${y}px)`;
return style;
};

@@ -35,2 +39,4 @@ }

style.top = `${y}px`;
return style;
};

@@ -37,0 +43,0 @@ })();

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