Remove getRandomElement
This commit is contained in:
parent
6da7e7603c
commit
d0f919c414
1 changed files with 6 additions and 5 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue