mirror of
https://github.com/kamranahmedse/driver.js.git
synced 2026-10-31 03:52:13 +08:00
Refactor and IE compatibility
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
"no-plusplus": "off",
|
||||
"no-cond-assign": "off",
|
||||
"func-names": "off",
|
||||
"no-continue": "off",
|
||||
"no-bitwise": "off",
|
||||
"class-methods-use-this": "off",
|
||||
"prefer-destructuring": "off",
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
"types": "types/index.d.ts",
|
||||
"scripts": {
|
||||
"start": "node server.js",
|
||||
"build-demo": "NODE_ENV=production webpack --config webpack.config.dev.js",
|
||||
"build-demo": "NODE_ENV=production webpack --config webpack.config.demo.js",
|
||||
"build": "webpack --config webpack.config.prod.js"
|
||||
},
|
||||
"bugs": {
|
||||
|
||||
@@ -2,7 +2,7 @@ const webpack = require('webpack');
|
||||
const WebpackDevServer = require('webpack-dev-server');
|
||||
const opn = require('opn');
|
||||
|
||||
const config = require('./webpack.config.dev');
|
||||
const config = require('./webpack.config.demo');
|
||||
|
||||
const PORT = 3000;
|
||||
const HOST = 'localhost';
|
||||
|
||||
+3
-3
@@ -219,9 +219,9 @@ export default class Element {
|
||||
this.node.classList.remove(CLASS_POSITION_RELATIVE);
|
||||
|
||||
const stackFixes = this.document.querySelectorAll(`.${CLASS_FIX_STACKING_CONTEXT}`);
|
||||
stackFixes.forEach((stackFix) => {
|
||||
stackFix.classList.remove(CLASS_FIX_STACKING_CONTEXT);
|
||||
});
|
||||
for (let counter = 0; counter < stackFixes.length; counter++) {
|
||||
stackFixes[counter].classList.remove(CLASS_FIX_STACKING_CONTEXT);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+4
-4
@@ -248,14 +248,14 @@ export default class Driver {
|
||||
defineSteps(steps) {
|
||||
this.steps = [];
|
||||
|
||||
steps.forEach((step, index) => {
|
||||
const element = this.prepareElementFromStep(step, steps, index);
|
||||
for (let counter = 0; counter < steps.length; counter++) {
|
||||
const element = this.prepareElementFromStep(steps[counter], steps, counter);
|
||||
if (!element) {
|
||||
return;
|
||||
continue;
|
||||
}
|
||||
|
||||
this.steps.push(element);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user