utils

Module: utils

Methods

(static) buildUrl(url, urlParams, hashopt) → {String}

Create an url with get parameters

Parameters
Name Type Attributes Description
url String

Base url

urlParams Object

object representing parameters

hash String <optional>

Hash to add

Returns

The full url with parameters and hash

Type
String

(static) createElement(tag, attropt, childrenopt) → {HTMLElement}

Create an html element with given attributes and children element

Parameters
Name Type Attributes Default Description
tag String

Tag name for the element

attr Object <optional>
null

Attributes to add to the elements

children Array <optional>
[]

Array of HTMLElement to add as children

Returns

The created html element

Type
HTMLElement

(static) createFrame(url, nameopt, sandbox) → {HTMLElement}

Create a new iframe element

Parameters
Name Type Attributes Default Description
url string

Url for the frame

name string <optional>
null

name of the frame

sandbox SandboxAttributes

reverse sandbox option

Returns

The iframe created

Type
HTMLElement

(static) loadUglify() → {function}

Load uglify from unpkg.com, required by Wrapper_JS.minify()

Returns

the minify function from uglifiyjs

Type
function

(static) randInt(min, max) → {number}

Return a random integer between min and max

Parameters
Name Type Description
min number

lower bound

max number

upper bound

Returns
Type
number

Type Definitions

SandboxAttributes

Properties:
Name Type Attributes Default Description
allow-downloads-without-user-activation Boolean <optional>
true
allow-downloads Boolean <optional>
true
allow-forms Boolean <optional>
true
allow-modals Boolean <optional>
true
allow-orientation-lock Boolean <optional>
true
allow-pointer-lock Boolean <optional>
true
allow-popups Boolean <optional>
true
allow-popups-to-escape-sandbox Boolean <optional>
true
allow-presentation Boolean <optional>
true
allow-same-origin Boolean <optional>
true
allow-scripts Boolean <optional>
true
allow-storage-access-by-user-activation Boolean <optional>
true
allow-top-navigation Boolean <optional>
true
allow-top-navigation-by-user-activation Boolean <optional>
true