Remove getRandomElement

This commit is contained in:
pyoor 2018-09-13 10:39:59 -04:00
parent 6da7e7603c
commit d0f919c414

View file

@ -7,12 +7,13 @@ const make = require('../make')
const utils = require('../utils')
class script extends utils {
/**
* Helper method for appending an element to body or documentElement
* @param {string} name - Element identifier
* @returns {string}
*/
static addElementToBody (name) {
return `(document.body || document.documentElement).appendChild${script.methodHead([name])}`
}
static getRandomElement () {
return `document.getElementsByTagName('*')[${random.number(document.getElementsByTagName('*').length)}]`
return `(document.body || document.documentElement).appendChild(${name})`
}
static makeArray (type, arrayLength, cb) {