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

karma-viewport

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

karma-viewport - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1

17

dist/adapter/index.js

@@ -165,2 +165,15 @@ (function(e, a) {

_createClass(Viewport, [ {
key: "load",
value: function load(url, cb) {
var _this = this;
if (typeof url !== "string" || !url.length) throw new TypeError("Invalid URL: " + (0,
_inspect2.default)(url));
if (typeof cb !== "function") throw new TypeError("Invalid callback");
this.el_.onload = function() {
_this.el_.onload = null;
cb();
};
this.el_.src = url;
}
}, {
key: "set",

@@ -202,6 +215,6 @@ value: function set() {

value: function between(first, last, cb) {
var _this = this;
var _this2 = this;
if (typeof cb !== "function") throw new TypeError("Invalid callback");
(0, _resolve4.default)(this.config_.breakpoints, first, last).forEach(function(breakpoint) {
_this.set(breakpoint.size.width, breakpoint.size.height);
_this2.set(breakpoint.size.width, breakpoint.size.height);
cb(breakpoint.name);

@@ -208,0 +221,0 @@ });

4

package.json
{
"name": "karma-viewport",
"version": "0.4.0",
"description": "Karma viewport resizer",
"version": "0.4.1",
"description": "A Karma plugin for testing responsive layouts",
"keywords": [

@@ -6,0 +6,0 @@ "breakpoint",

@@ -91,4 +91,11 @@ [![Travis][travis-image]][travis-link]

Note that the `iframe#viewport` element must be present in the `context.html`
and `debug.html` files that are served by Karma.
and `debug.html` files that are served by Karma. Using a separate, custom
context makes it possible to load entire webpages for testing:
``` js
beforeEach(done => {
viewport.load("/path/to/fixture.html", done)
})
```
[3]: http://karma-runner.github.io/1.0/config/configuration-file.html

@@ -95,0 +102,0 @@

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