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') const utils = require('../utils')
class script extends 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) { static addElementToBody (name) {
return `(document.body || document.documentElement).appendChild${script.methodHead([name])}` return `(document.body || document.documentElement).appendChild(${name})`
}
static getRandomElement () {
return `document.getElementsByTagName('*')[${random.number(document.getElementsByTagName('*').length)}]`
} }
static makeArray (type, arrayLength, cb) { static makeArray (type, arrayLength, cb) {