id
int32
0
58k
repo
stringlengths
5
67
path
stringlengths
4
116
func_name
stringlengths
0
58
original_string
stringlengths
52
373k
language
stringclasses
1 value
code
stringlengths
52
373k
code_tokens
list
docstring
stringlengths
4
11.8k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
86
226
300
apache/incubator-echarts
src/component/axis/AxisBuilder.js
function (axisModel, opt) { /** * @readOnly */ this.opt = opt; /** * @readOnly */ this.axisModel = axisModel; // Default value defaults( opt, { labelOffset: 0, nameDirection: 1, tickDirection: 1, labelDirectio...
javascript
function (axisModel, opt) { /** * @readOnly */ this.opt = opt; /** * @readOnly */ this.axisModel = axisModel; // Default value defaults( opt, { labelOffset: 0, nameDirection: 1, tickDirection: 1, labelDirectio...
[ "function", "(", "axisModel", ",", "opt", ")", "{", "/**\n * @readOnly\n */", "this", ".", "opt", "=", "opt", ";", "/**\n * @readOnly\n */", "this", ".", "axisModel", "=", "axisModel", ";", "// Default value", "defaults", "(", "opt", ",", "{", "l...
A final axis is translated and rotated from a "standard axis". So opt.position and opt.rotation is required. A standard axis is and axis from [0, 0] to [0, axisExtent[1]], for example: (0, 0) ------------> (0, 50) nameDirection or tickDirection or labelDirection is 1 means tick or label is below the standard axis, wh...
[ "A", "final", "axis", "is", "translated", "and", "rotated", "from", "a", "standard", "axis", ".", "So", "opt", ".", "position", "and", "opt", ".", "rotation", "is", "required", "." ]
4d0ea095dc3929cb6de40c45748826e7999c7aa8
https://github.com/apache/incubator-echarts/blob/4d0ea095dc3929cb6de40c45748826e7999c7aa8/src/component/axis/AxisBuilder.js#L71-L113
301
apache/incubator-echarts
src/component/tooltip/TooltipContent.js
function () { // FIXME // Move this logic to ec main? var container = this._container; var stl = container.currentStyle || document.defaultView.getComputedStyle(container); var domStyle = container.style; if (domStyle.position !== 'absolute' && stl.position !=...
javascript
function () { // FIXME // Move this logic to ec main? var container = this._container; var stl = container.currentStyle || document.defaultView.getComputedStyle(container); var domStyle = container.style; if (domStyle.position !== 'absolute' && stl.position !=...
[ "function", "(", ")", "{", "// FIXME", "// Move this logic to ec main?", "var", "container", "=", "this", ".", "_container", ";", "var", "stl", "=", "container", ".", "currentStyle", "||", "document", ".", "defaultView", ".", "getComputedStyle", "(", "container", ...
Update when tooltip is rendered
[ "Update", "when", "tooltip", "is", "rendered" ]
4d0ea095dc3929cb6de40c45748826e7999c7aa8
https://github.com/apache/incubator-echarts/blob/4d0ea095dc3929cb6de40c45748826e7999c7aa8/src/component/tooltip/TooltipContent.js#L194-L207
302
apache/incubator-echarts
src/data/helper/linkList.js
getLinkedData
function getLinkedData(dataType) { var mainData = this[MAIN_DATA]; return (dataType == null || mainData == null) ? mainData : mainData[DATAS][dataType]; }
javascript
function getLinkedData(dataType) { var mainData = this[MAIN_DATA]; return (dataType == null || mainData == null) ? mainData : mainData[DATAS][dataType]; }
[ "function", "getLinkedData", "(", "dataType", ")", "{", "var", "mainData", "=", "this", "[", "MAIN_DATA", "]", ";", "return", "(", "dataType", "==", "null", "||", "mainData", "==", "null", ")", "?", "mainData", ":", "mainData", "[", "DATAS", "]", "[", ...
Supplement method to List. @public @param {string} [dataType] If not specified, return mainData. @return {module:echarts/data/List}
[ "Supplement", "method", "to", "List", "." ]
4d0ea095dc3929cb6de40c45748826e7999c7aa8
https://github.com/apache/incubator-echarts/blob/4d0ea095dc3929cb6de40c45748826e7999c7aa8/src/data/helper/linkList.js#L119-L124
303
apache/incubator-echarts
src/component/dataZoom/dataZoomProcessor.js
function (ecModel, api) { ecModel.eachComponent('dataZoom', function (dataZoomModel) { // We calculate window and reset axis here but not in model // init stage and not after action dispatch handler, because // reset should be called after seriesData.restoreData. ...
javascript
function (ecModel, api) { ecModel.eachComponent('dataZoom', function (dataZoomModel) { // We calculate window and reset axis here but not in model // init stage and not after action dispatch handler, because // reset should be called after seriesData.restoreData. ...
[ "function", "(", "ecModel", ",", "api", ")", "{", "ecModel", ".", "eachComponent", "(", "'dataZoom'", ",", "function", "(", "dataZoomModel", ")", "{", "// We calculate window and reset axis here but not in model", "// init stage and not after action dispatch handler, because", ...
Consider appendData, where filter should be performed. Because data process is in block mode currently, it is not need to worry about that the overallProgress execute every frame.
[ "Consider", "appendData", "where", "filter", "should", "be", "performed", ".", "Because", "data", "process", "is", "in", "block", "mode", "currently", "it", "is", "not", "need", "to", "worry", "about", "that", "the", "overallProgress", "execute", "every", "fra...
4d0ea095dc3929cb6de40c45748826e7999c7aa8
https://github.com/apache/incubator-echarts/blob/4d0ea095dc3929cb6de40c45748826e7999c7aa8/src/component/dataZoom/dataZoomProcessor.js#L48-L91
304
apache/incubator-echarts
src/coord/polar/Polar.js
function (point) { var coord = this.pointToCoord(point); return this._radiusAxis.contain(coord[0]) && this._angleAxis.contain(coord[1]); }
javascript
function (point) { var coord = this.pointToCoord(point); return this._radiusAxis.contain(coord[0]) && this._angleAxis.contain(coord[1]); }
[ "function", "(", "point", ")", "{", "var", "coord", "=", "this", ".", "pointToCoord", "(", "point", ")", ";", "return", "this", ".", "_radiusAxis", ".", "contain", "(", "coord", "[", "0", "]", ")", "&&", "this", ".", "_angleAxis", ".", "contain", "("...
If contain coord @param {Array.<number>} point @return {boolean}
[ "If", "contain", "coord" ]
4d0ea095dc3929cb6de40c45748826e7999c7aa8
https://github.com/apache/incubator-echarts/blob/4d0ea095dc3929cb6de40c45748826e7999c7aa8/src/coord/polar/Polar.js#L90-L94
305
apache/incubator-echarts
src/coord/polar/Polar.js
function (scaleType) { var axes = []; var angleAxis = this._angleAxis; var radiusAxis = this._radiusAxis; angleAxis.scale.type === scaleType && axes.push(angleAxis); radiusAxis.scale.type === scaleType && axes.push(radiusAxis); return axes; }
javascript
function (scaleType) { var axes = []; var angleAxis = this._angleAxis; var radiusAxis = this._radiusAxis; angleAxis.scale.type === scaleType && axes.push(angleAxis); radiusAxis.scale.type === scaleType && axes.push(radiusAxis); return axes; }
[ "function", "(", "scaleType", ")", "{", "var", "axes", "=", "[", "]", ";", "var", "angleAxis", "=", "this", ".", "_angleAxis", ";", "var", "radiusAxis", "=", "this", ".", "_radiusAxis", ";", "angleAxis", ".", "scale", ".", "type", "===", "scaleType", "...
Get axes by type of scale @param {string} scaleType @return {module:echarts/coord/polar/AngleAxis|module:echarts/coord/polar/RadiusAxis}
[ "Get", "axes", "by", "type", "of", "scale" ]
4d0ea095dc3929cb6de40c45748826e7999c7aa8
https://github.com/apache/incubator-echarts/blob/4d0ea095dc3929cb6de40c45748826e7999c7aa8/src/coord/polar/Polar.js#L126-L134
306
apache/incubator-echarts
src/chart/line/poly.js
drawNonMono
function drawNonMono( ctx, points, start, segLen, allLen, dir, smoothMin, smoothMax, smooth, smoothMonotone, connectNulls ) { var prevIdx = 0; var idx = start; for (var k = 0; k < segLen; k++) { var p = points[idx]; if (idx >= allLen || idx < 0) { break; } ...
javascript
function drawNonMono( ctx, points, start, segLen, allLen, dir, smoothMin, smoothMax, smooth, smoothMonotone, connectNulls ) { var prevIdx = 0; var idx = start; for (var k = 0; k < segLen; k++) { var p = points[idx]; if (idx >= allLen || idx < 0) { break; } ...
[ "function", "drawNonMono", "(", "ctx", ",", "points", ",", "start", ",", "segLen", ",", "allLen", ",", "dir", ",", "smoothMin", ",", "smoothMax", ",", "smooth", ",", "smoothMonotone", ",", "connectNulls", ")", "{", "var", "prevIdx", "=", "0", ";", "var",...
Draw smoothed line in non-monotone, in may cause undesired curve in extreme situations. This should be used when points are non-monotone neither in x or y dimension.
[ "Draw", "smoothed", "line", "in", "non", "-", "monotone", "in", "may", "cause", "undesired", "curve", "in", "extreme", "situations", ".", "This", "should", "be", "used", "when", "points", "are", "non", "-", "monotone", "neither", "in", "x", "or", "y", "d...
4d0ea095dc3929cb6de40c45748826e7999c7aa8
https://github.com/apache/incubator-echarts/blob/4d0ea095dc3929cb6de40c45748826e7999c7aa8/src/chart/line/poly.js#L171-L262
307
apache/incubator-echarts
src/component/visualMap/visualEncoding.js
getColorVisual
function getColorVisual(seriesModel, visualMapModel, value, valueState) { var mappings = visualMapModel.targetVisuals[valueState]; var visualTypes = VisualMapping.prepareVisualTypes(mappings); var resultVisual = { color: seriesModel.getData().getVisual('color') // default color. }; for (var...
javascript
function getColorVisual(seriesModel, visualMapModel, value, valueState) { var mappings = visualMapModel.targetVisuals[valueState]; var visualTypes = VisualMapping.prepareVisualTypes(mappings); var resultVisual = { color: seriesModel.getData().getVisual('color') // default color. }; for (var...
[ "function", "getColorVisual", "(", "seriesModel", ",", "visualMapModel", ",", "value", ",", "valueState", ")", "{", "var", "mappings", "=", "visualMapModel", ".", "targetVisuals", "[", "valueState", "]", ";", "var", "visualTypes", "=", "VisualMapping", ".", "pre...
FIXME performance and export for heatmap? value can be Infinity or -Infinity
[ "FIXME", "performance", "and", "export", "for", "heatmap?", "value", "can", "be", "Infinity", "or", "-", "Infinity" ]
4d0ea095dc3929cb6de40c45748826e7999c7aa8
https://github.com/apache/incubator-echarts/blob/4d0ea095dc3929cb6de40c45748826e7999c7aa8/src/component/visualMap/visualEncoding.js#L82-L106
308
vuejs/vuex
dist/vuex.esm.js
vuexInit
function vuexInit () { var options = this.$options; // store injection if (options.store) { this.$store = typeof options.store === 'function' ? options.store() : options.store; } else if (options.parent && options.parent.$store) { this.$store = options.parent.$store; } ...
javascript
function vuexInit () { var options = this.$options; // store injection if (options.store) { this.$store = typeof options.store === 'function' ? options.store() : options.store; } else if (options.parent && options.parent.$store) { this.$store = options.parent.$store; } ...
[ "function", "vuexInit", "(", ")", "{", "var", "options", "=", "this", ".", "$options", ";", "// store injection", "if", "(", "options", ".", "store", ")", "{", "this", ".", "$store", "=", "typeof", "options", ".", "store", "===", "'function'", "?", "opti...
Vuex init hook, injected into each instances init hooks list.
[ "Vuex", "init", "hook", "injected", "into", "each", "instances", "init", "hooks", "list", "." ]
d7c7f9844831f98c5c9aaca213746c4ccc5d6929
https://github.com/vuejs/vuex/blob/d7c7f9844831f98c5c9aaca213746c4ccc5d6929/dist/vuex.esm.js#L29-L39
309
vuejs/vuex
dist/vuex.esm.js
forEachValue
function forEachValue (obj, fn) { Object.keys(obj).forEach(function (key) { return fn(obj[key], key); }); }
javascript
function forEachValue (obj, fn) { Object.keys(obj).forEach(function (key) { return fn(obj[key], key); }); }
[ "function", "forEachValue", "(", "obj", ",", "fn", ")", "{", "Object", ".", "keys", "(", "obj", ")", ".", "forEach", "(", "function", "(", "key", ")", "{", "return", "fn", "(", "obj", "[", "key", "]", ",", "key", ")", ";", "}", ")", ";", "}" ]
Get the first item that pass the test by second argument function @param {Array} list @param {Function} f @return {*} forEach for object
[ "Get", "the", "first", "item", "that", "pass", "the", "test", "by", "second", "argument", "function" ]
d7c7f9844831f98c5c9aaca213746c4ccc5d6929
https://github.com/vuejs/vuex/blob/d7c7f9844831f98c5c9aaca213746c4ccc5d6929/dist/vuex.esm.js#L74-L76
310
vuejs/vuex
dist/vuex.esm.js
Module
function Module (rawModule, runtime) { this.runtime = runtime; // Store some children item this._children = Object.create(null); // Store the origin module object which passed by programmer this._rawModule = rawModule; var rawState = rawModule.state; // Store the origin module's state this.state = (typ...
javascript
function Module (rawModule, runtime) { this.runtime = runtime; // Store some children item this._children = Object.create(null); // Store the origin module object which passed by programmer this._rawModule = rawModule; var rawState = rawModule.state; // Store the origin module's state this.state = (typ...
[ "function", "Module", "(", "rawModule", ",", "runtime", ")", "{", "this", ".", "runtime", "=", "runtime", ";", "// Store some children item", "this", ".", "_children", "=", "Object", ".", "create", "(", "null", ")", ";", "// Store the origin module object which pa...
Base data struct for store's module, package with some attribute and method
[ "Base", "data", "struct", "for", "store", "s", "module", "package", "with", "some", "attribute", "and", "method" ]
d7c7f9844831f98c5c9aaca213746c4ccc5d6929
https://github.com/vuejs/vuex/blob/d7c7f9844831f98c5c9aaca213746c4ccc5d6929/dist/vuex.esm.js#L91-L101
311
vuejs/vuex
dist/vuex.esm.js
normalizeNamespace
function normalizeNamespace (fn) { return function (namespace, map) { if (typeof namespace !== 'string') { map = namespace; namespace = ''; } else if (namespace.charAt(namespace.length - 1) !== '/') { namespace += '/'; } return fn(namespace, map) } }
javascript
function normalizeNamespace (fn) { return function (namespace, map) { if (typeof namespace !== 'string') { map = namespace; namespace = ''; } else if (namespace.charAt(namespace.length - 1) !== '/') { namespace += '/'; } return fn(namespace, map) } }
[ "function", "normalizeNamespace", "(", "fn", ")", "{", "return", "function", "(", "namespace", ",", "map", ")", "{", "if", "(", "typeof", "namespace", "!==", "'string'", ")", "{", "map", "=", "namespace", ";", "namespace", "=", "''", ";", "}", "else", ...
Return a function expect two param contains namespace and map. it will normalize the namespace and then the param's function will handle the new namespace and the map. @param {Function} fn @return {Function}
[ "Return", "a", "function", "expect", "two", "param", "contains", "namespace", "and", "map", ".", "it", "will", "normalize", "the", "namespace", "and", "then", "the", "param", "s", "function", "will", "handle", "the", "new", "namespace", "and", "the", "map", ...
d7c7f9844831f98c5c9aaca213746c4ccc5d6929
https://github.com/vuejs/vuex/blob/d7c7f9844831f98c5c9aaca213746c4ccc5d6929/dist/vuex.esm.js#L960-L970
312
vuejs/vuex
src/helpers.js
getModuleByNamespace
function getModuleByNamespace (store, helper, namespace) { const module = store._modulesNamespaceMap[namespace] if (process.env.NODE_ENV !== 'production' && !module) { console.error(`[vuex] module namespace not found in ${helper}(): ${namespace}`) } return module }
javascript
function getModuleByNamespace (store, helper, namespace) { const module = store._modulesNamespaceMap[namespace] if (process.env.NODE_ENV !== 'production' && !module) { console.error(`[vuex] module namespace not found in ${helper}(): ${namespace}`) } return module }
[ "function", "getModuleByNamespace", "(", "store", ",", "helper", ",", "namespace", ")", "{", "const", "module", "=", "store", ".", "_modulesNamespaceMap", "[", "namespace", "]", "if", "(", "process", ".", "env", ".", "NODE_ENV", "!==", "'production'", "&&", ...
Search a special module from store by namespace. if module not exist, print error message. @param {Object} store @param {String} helper @param {String} namespace @return {Object}
[ "Search", "a", "special", "module", "from", "store", "by", "namespace", ".", "if", "module", "not", "exist", "print", "error", "message", "." ]
d7c7f9844831f98c5c9aaca213746c4ccc5d6929
https://github.com/vuejs/vuex/blob/d7c7f9844831f98c5c9aaca213746c4ccc5d6929/src/helpers.js#L161-L167
313
vuejs/vuex
src/store.js
makeLocalContext
function makeLocalContext (store, namespace, path) { const noNamespace = namespace === '' const local = { dispatch: noNamespace ? store.dispatch : (_type, _payload, _options) => { const args = unifyObjectStyle(_type, _payload, _options) const { payload, options } = args let { type } = args ...
javascript
function makeLocalContext (store, namespace, path) { const noNamespace = namespace === '' const local = { dispatch: noNamespace ? store.dispatch : (_type, _payload, _options) => { const args = unifyObjectStyle(_type, _payload, _options) const { payload, options } = args let { type } = args ...
[ "function", "makeLocalContext", "(", "store", ",", "namespace", ",", "path", ")", "{", "const", "noNamespace", "=", "namespace", "===", "''", "const", "local", "=", "{", "dispatch", ":", "noNamespace", "?", "store", ".", "dispatch", ":", "(", "_type", ",",...
make localized dispatch, commit, getters and state if there is no namespace, just use root ones
[ "make", "localized", "dispatch", "commit", "getters", "and", "state", "if", "there", "is", "no", "namespace", "just", "use", "root", "ones" ]
d7c7f9844831f98c5c9aaca213746c4ccc5d6929
https://github.com/vuejs/vuex/blob/d7c7f9844831f98c5c9aaca213746c4ccc5d6929/src/store.js#L343-L394
314
transloadit/uppy
packages/@uppy/golden-retriever/src/IndexedDBStore.js
migrateExpiration
function migrateExpiration (store) { const request = store.openCursor() request.onsuccess = (event) => { const cursor = event.target.result if (!cursor) { return } const entry = cursor.value entry.expires = Date.now() + DEFAULT_EXPIRY cursor.update(entry) } }
javascript
function migrateExpiration (store) { const request = store.openCursor() request.onsuccess = (event) => { const cursor = event.target.result if (!cursor) { return } const entry = cursor.value entry.expires = Date.now() + DEFAULT_EXPIRY cursor.update(entry) } }
[ "function", "migrateExpiration", "(", "store", ")", "{", "const", "request", "=", "store", ".", "openCursor", "(", ")", "request", ".", "onsuccess", "=", "(", "event", ")", "=>", "{", "const", "cursor", "=", "event", ".", "target", ".", "result", "if", ...
Set default `expires` dates on existing stored blobs.
[ "Set", "default", "expires", "dates", "on", "existing", "stored", "blobs", "." ]
7ae18bf992d544a64da998f033258ec09a3de275
https://github.com/transloadit/uppy/blob/7ae18bf992d544a64da998f033258ec09a3de275/packages/@uppy/golden-retriever/src/IndexedDBStore.js#L13-L24
315
transloadit/uppy
packages/@uppy/core/src/Plugin.js
debounce
function debounce (fn) { let calling = null let latestArgs = null return (...args) => { latestArgs = args if (!calling) { calling = Promise.resolve().then(() => { calling = null // At this point `args` may be different from the most // recent state, if multiple calls happened...
javascript
function debounce (fn) { let calling = null let latestArgs = null return (...args) => { latestArgs = args if (!calling) { calling = Promise.resolve().then(() => { calling = null // At this point `args` may be different from the most // recent state, if multiple calls happened...
[ "function", "debounce", "(", "fn", ")", "{", "let", "calling", "=", "null", "let", "latestArgs", "=", "null", "return", "(", "...", "args", ")", "=>", "{", "latestArgs", "=", "args", "if", "(", "!", "calling", ")", "{", "calling", "=", "Promise", "."...
Defer a frequent call to the microtask queue.
[ "Defer", "a", "frequent", "call", "to", "the", "microtask", "queue", "." ]
7ae18bf992d544a64da998f033258ec09a3de275
https://github.com/transloadit/uppy/blob/7ae18bf992d544a64da998f033258ec09a3de275/packages/@uppy/core/src/Plugin.js#L7-L24
316
transloadit/uppy
packages/@uppy/transloadit/src/AssemblyOptions.js
validateParams
function validateParams (params) { if (!params) { throw new Error('Transloadit: The `params` option is required.') } if (typeof params === 'string') { try { params = JSON.parse(params) } catch (err) { // Tell the user that this is not an Uppy bug! err.message = 'Transloadit: The `pa...
javascript
function validateParams (params) { if (!params) { throw new Error('Transloadit: The `params` option is required.') } if (typeof params === 'string') { try { params = JSON.parse(params) } catch (err) { // Tell the user that this is not an Uppy bug! err.message = 'Transloadit: The `pa...
[ "function", "validateParams", "(", "params", ")", "{", "if", "(", "!", "params", ")", "{", "throw", "new", "Error", "(", "'Transloadit: The `params` option is required.'", ")", "}", "if", "(", "typeof", "params", "===", "'string'", ")", "{", "try", "{", "par...
Check that Assembly parameters are present and include all required fields.
[ "Check", "that", "Assembly", "parameters", "are", "present", "and", "include", "all", "required", "fields", "." ]
7ae18bf992d544a64da998f033258ec09a3de275
https://github.com/transloadit/uppy/blob/7ae18bf992d544a64da998f033258ec09a3de275/packages/@uppy/transloadit/src/AssemblyOptions.js#L4-L24
317
transloadit/uppy
examples/react-native-expo/FileList.js
FileIcon
function FileIcon () { return <View style={styles.itemIconContainer}> <Image style={styles.itemIcon} source={require('./assets/file-icon.png')} /> </View> }
javascript
function FileIcon () { return <View style={styles.itemIconContainer}> <Image style={styles.itemIcon} source={require('./assets/file-icon.png')} /> </View> }
[ "function", "FileIcon", "(", ")", "{", "return", "<", "View", "style", "=", "{", "styles", ".", "itemIconContainer", "}", ">", "\n ", "<", "Image", "style", "=", "{", "styles", ".", "itemIcon", "}", "source", "=", "{", "require", "(", "'./assets/file-...
return str }
[ "return", "str", "}" ]
7ae18bf992d544a64da998f033258ec09a3de275
https://github.com/transloadit/uppy/blob/7ae18bf992d544a64da998f033258ec09a3de275/examples/react-native-expo/FileList.js#L18-L25
318
transloadit/uppy
packages/@uppy/companion/src/server/controllers/authorized.js
authorized
function authorized (req, res) { const { params, uppy } = req const providerName = params.providerName if (!uppy.providerTokens || !uppy.providerTokens[providerName]) { return res.json({ authenticated: false }) } const token = uppy.providerTokens[providerName] uppy.provider.list({ token, uppy }, (err,...
javascript
function authorized (req, res) { const { params, uppy } = req const providerName = params.providerName if (!uppy.providerTokens || !uppy.providerTokens[providerName]) { return res.json({ authenticated: false }) } const token = uppy.providerTokens[providerName] uppy.provider.list({ token, uppy }, (err,...
[ "function", "authorized", "(", "req", ",", "res", ")", "{", "const", "{", "params", ",", "uppy", "}", "=", "req", "const", "providerName", "=", "params", ".", "providerName", "if", "(", "!", "uppy", ".", "providerTokens", "||", "!", "uppy", ".", "provi...
checks if companion is authorized to access a user's provider account. @param {object} req @param {object} res
[ "checks", "if", "companion", "is", "authorized", "to", "access", "a", "user", "s", "provider", "account", "." ]
7ae18bf992d544a64da998f033258ec09a3de275
https://github.com/transloadit/uppy/blob/7ae18bf992d544a64da998f033258ec09a3de275/packages/@uppy/companion/src/server/controllers/authorized.js#L12-L28
319
transloadit/uppy
website/inject.js
injectGhStars
async function injectGhStars () { const opts = {} if ('GITHUB_TOKEN' in process.env) { opts.auth = process.env.GITHUB_TOKEN } const Octokit = require('@octokit/rest') const octokit = new Octokit(opts) let { headers, data } = await octokit.repos.get({ owner: 'transloadit', repo: 'uppy' }) ...
javascript
async function injectGhStars () { const opts = {} if ('GITHUB_TOKEN' in process.env) { opts.auth = process.env.GITHUB_TOKEN } const Octokit = require('@octokit/rest') const octokit = new Octokit(opts) let { headers, data } = await octokit.repos.get({ owner: 'transloadit', repo: 'uppy' }) ...
[ "async", "function", "injectGhStars", "(", ")", "{", "const", "opts", "=", "{", "}", "if", "(", "'GITHUB_TOKEN'", "in", "process", ".", "env", ")", "{", "opts", ".", "auth", "=", "process", ".", "env", ".", "GITHUB_TOKEN", "}", "const", "Octokit", "=",...
re-enable after rate limiter issue is fixed
[ "re", "-", "enable", "after", "rate", "limiter", "issue", "is", "fixed" ]
7ae18bf992d544a64da998f033258ec09a3de275
https://github.com/transloadit/uppy/blob/7ae18bf992d544a64da998f033258ec09a3de275/website/inject.js#L131-L151
320
transloadit/uppy
packages/@uppy/aws-s3-multipart/src/index.js
createEventTracker
function createEventTracker (emitter) { const events = [] return { on (event, fn) { events.push([ event, fn ]) return emitter.on(event, fn) }, remove () { events.forEach(([ event, fn ]) => { emitter.off(event, fn) }) } } }
javascript
function createEventTracker (emitter) { const events = [] return { on (event, fn) { events.push([ event, fn ]) return emitter.on(event, fn) }, remove () { events.forEach(([ event, fn ]) => { emitter.off(event, fn) }) } } }
[ "function", "createEventTracker", "(", "emitter", ")", "{", "const", "events", "=", "[", "]", "return", "{", "on", "(", "event", ",", "fn", ")", "{", "events", ".", "push", "(", "[", "event", ",", "fn", "]", ")", "return", "emitter", ".", "on", "("...
Create a wrapper around an event emitter with a `remove` method to remove all events that were added using the wrapped emitter.
[ "Create", "a", "wrapper", "around", "an", "event", "emitter", "with", "a", "remove", "method", "to", "remove", "all", "events", "that", "were", "added", "using", "the", "wrapped", "emitter", "." ]
7ae18bf992d544a64da998f033258ec09a3de275
https://github.com/transloadit/uppy/blob/7ae18bf992d544a64da998f033258ec09a3de275/packages/@uppy/aws-s3-multipart/src/index.js#L12-L25
321
transloadit/uppy
packages/@uppy/provider-views/src/index.js
findIndex
function findIndex (array, predicate) { for (let i = 0; i < array.length; i++) { if (predicate(array[i])) return i } return -1 }
javascript
function findIndex (array, predicate) { for (let i = 0; i < array.length; i++) { if (predicate(array[i])) return i } return -1 }
[ "function", "findIndex", "(", "array", ",", "predicate", ")", "{", "for", "(", "let", "i", "=", "0", ";", "i", "<", "array", ".", "length", ";", "i", "++", ")", "{", "if", "(", "predicate", "(", "array", "[", "i", "]", ")", ")", "return", "i", ...
Array.prototype.findIndex ponyfill for old browsers.
[ "Array", ".", "prototype", ".", "findIndex", "ponyfill", "for", "old", "browsers", "." ]
7ae18bf992d544a64da998f033258ec09a3de275
https://github.com/transloadit/uppy/blob/7ae18bf992d544a64da998f033258ec09a3de275/packages/@uppy/provider-views/src/index.js#L12-L17
322
transloadit/uppy
packages/@uppy/golden-retriever/src/MetaDataStore.js
findUppyInstances
function findUppyInstances () { const instances = [] for (let i = 0; i < localStorage.length; i++) { const key = localStorage.key(i) if (/^uppyState:/.test(key)) { instances.push(key.slice('uppyState:'.length)) } } return instances }
javascript
function findUppyInstances () { const instances = [] for (let i = 0; i < localStorage.length; i++) { const key = localStorage.key(i) if (/^uppyState:/.test(key)) { instances.push(key.slice('uppyState:'.length)) } } return instances }
[ "function", "findUppyInstances", "(", ")", "{", "const", "instances", "=", "[", "]", "for", "(", "let", "i", "=", "0", ";", "i", "<", "localStorage", ".", "length", ";", "i", "++", ")", "{", "const", "key", "=", "localStorage", ".", "key", "(", "i"...
Get uppy instance IDs for which state is stored.
[ "Get", "uppy", "instance", "IDs", "for", "which", "state", "is", "stored", "." ]
7ae18bf992d544a64da998f033258ec09a3de275
https://github.com/transloadit/uppy/blob/7ae18bf992d544a64da998f033258ec09a3de275/packages/@uppy/golden-retriever/src/MetaDataStore.js#L4-L13
323
transloadit/uppy
examples/transloadit/main.js
openModal
function openModal () { robodog.pick({ restrictions: { allowedFileTypes: ['.png'] }, waitForEncoding: true, params: { auth: { key: TRANSLOADIT_KEY }, template_id: TEMPLATE_ID }, providers: [ 'webcam' ] // if providers need custom config // webcam: { // ...
javascript
function openModal () { robodog.pick({ restrictions: { allowedFileTypes: ['.png'] }, waitForEncoding: true, params: { auth: { key: TRANSLOADIT_KEY }, template_id: TEMPLATE_ID }, providers: [ 'webcam' ] // if providers need custom config // webcam: { // ...
[ "function", "openModal", "(", ")", "{", "robodog", ".", "pick", "(", "{", "restrictions", ":", "{", "allowedFileTypes", ":", "[", "'.png'", "]", "}", ",", "waitForEncoding", ":", "true", ",", "params", ":", "{", "auth", ":", "{", "key", ":", "TRANSLOAD...
robodog.modal
[ "robodog", ".", "modal" ]
7ae18bf992d544a64da998f033258ec09a3de275
https://github.com/transloadit/uppy/blob/7ae18bf992d544a64da998f033258ec09a3de275/examples/transloadit/main.js#L81-L99
324
transloadit/uppy
packages/@uppy/companion/src/server/controllers/s3.js
getUploadParameters
function getUploadParameters (req, res, next) { // @ts-ignore The `uppy` property is added by middleware before reaching here. const client = req.uppy.s3Client const key = config.getKey(req, req.query.filename) if (typeof key !== 'string') { return res.status(500).json({ error: 's3: filename retur...
javascript
function getUploadParameters (req, res, next) { // @ts-ignore The `uppy` property is added by middleware before reaching here. const client = req.uppy.s3Client const key = config.getKey(req, req.query.filename) if (typeof key !== 'string') { return res.status(500).json({ error: 's3: filename retur...
[ "function", "getUploadParameters", "(", "req", ",", "res", ",", "next", ")", "{", "// @ts-ignore The `uppy` property is added by middleware before reaching here.", "const", "client", "=", "req", ".", "uppy", ".", "s3Client", "const", "key", "=", "config", ".", "getKey...
Get upload paramaters for a simple direct upload. Expected query parameters: - filename - The name of the file, given to the `config.getKey` option to determine the object key name in the S3 bucket. - type - The MIME type of the file. Response JSON: - method - The HTTP method to use to upload. - url - The URL to uplo...
[ "Get", "upload", "paramaters", "for", "a", "simple", "direct", "upload", "." ]
7ae18bf992d544a64da998f033258ec09a3de275
https://github.com/transloadit/uppy/blob/7ae18bf992d544a64da998f033258ec09a3de275/packages/@uppy/companion/src/server/controllers/s3.js#L25-L56
325
transloadit/uppy
packages/@uppy/companion/src/server/controllers/s3.js
createMultipartUpload
function createMultipartUpload (req, res, next) { // @ts-ignore The `uppy` property is added by middleware before reaching here. const client = req.uppy.s3Client const key = config.getKey(req, req.body.filename) const { type } = req.body if (typeof key !== 'string') { return res.status(500).js...
javascript
function createMultipartUpload (req, res, next) { // @ts-ignore The `uppy` property is added by middleware before reaching here. const client = req.uppy.s3Client const key = config.getKey(req, req.body.filename) const { type } = req.body if (typeof key !== 'string') { return res.status(500).js...
[ "function", "createMultipartUpload", "(", "req", ",", "res", ",", "next", ")", "{", "// @ts-ignore The `uppy` property is added by middleware before reaching here.", "const", "client", "=", "req", ".", "uppy", ".", "s3Client", "const", "key", "=", "config", ".", "getK...
Create an S3 multipart upload. With this, files can be uploaded in chunks of 5MB+ each. Expected JSON body: - filename - The name of the file, given to the `config.getKey` option to determine the object key name in the S3 bucket. - type - The MIME type of the file. Response JSON: - key - The object key in the S3 buck...
[ "Create", "an", "S3", "multipart", "upload", ".", "With", "this", "files", "can", "be", "uploaded", "in", "chunks", "of", "5MB", "+", "each", "." ]
7ae18bf992d544a64da998f033258ec09a3de275
https://github.com/transloadit/uppy/blob/7ae18bf992d544a64da998f033258ec09a3de275/packages/@uppy/companion/src/server/controllers/s3.js#L70-L98
326
transloadit/uppy
packages/@uppy/companion/src/server/controllers/s3.js
getUploadedParts
function getUploadedParts (req, res, next) { // @ts-ignore The `uppy` property is added by middleware before reaching here. const client = req.uppy.s3Client const { uploadId } = req.params const { key } = req.query if (typeof key !== 'string') { return res.status(400).json({ error: 's3: the o...
javascript
function getUploadedParts (req, res, next) { // @ts-ignore The `uppy` property is added by middleware before reaching here. const client = req.uppy.s3Client const { uploadId } = req.params const { key } = req.query if (typeof key !== 'string') { return res.status(400).json({ error: 's3: the o...
[ "function", "getUploadedParts", "(", "req", ",", "res", ",", "next", ")", "{", "// @ts-ignore The `uppy` property is added by middleware before reaching here.", "const", "client", "=", "req", ".", "uppy", ".", "s3Client", "const", "{", "uploadId", "}", "=", "req", "...
List parts that have been fully uploaded so far. Expected URL parameters: - uploadId - The uploadId returned from `createMultipartUpload`. Expected query parameters: - key - The object key in the S3 bucket. Response JSON: - An array of objects representing parts: - PartNumber - the index of this part. - ETag - a hash ...
[ "List", "parts", "that", "have", "been", "fully", "uploaded", "so", "far", "." ]
7ae18bf992d544a64da998f033258ec09a3de275
https://github.com/transloadit/uppy/blob/7ae18bf992d544a64da998f033258ec09a3de275/packages/@uppy/companion/src/server/controllers/s3.js#L113-L152
327
transloadit/uppy
packages/@uppy/companion/src/server/controllers/s3.js
signPartUpload
function signPartUpload (req, res, next) { // @ts-ignore The `uppy` property is added by middleware before reaching here. const client = req.uppy.s3Client const { uploadId, partNumber } = req.params const { key } = req.query if (typeof key !== 'string') { return res.status(400).json({ error: ...
javascript
function signPartUpload (req, res, next) { // @ts-ignore The `uppy` property is added by middleware before reaching here. const client = req.uppy.s3Client const { uploadId, partNumber } = req.params const { key } = req.query if (typeof key !== 'string') { return res.status(400).json({ error: ...
[ "function", "signPartUpload", "(", "req", ",", "res", ",", "next", ")", "{", "// @ts-ignore The `uppy` property is added by middleware before reaching here.", "const", "client", "=", "req", ".", "uppy", ".", "s3Client", "const", "{", "uploadId", ",", "partNumber", "}"...
Get parameters for uploading one part. Expected URL parameters: - uploadId - The uploadId returned from `createMultipartUpload`. - partNumber - This part's index in the file (1-10000). Expected query parameters: - key - The object key in the S3 bucket. Response JSON: - url - The URL to upload to, including signed quer...
[ "Get", "parameters", "for", "uploading", "one", "part", "." ]
7ae18bf992d544a64da998f033258ec09a3de275
https://github.com/transloadit/uppy/blob/7ae18bf992d544a64da998f033258ec09a3de275/packages/@uppy/companion/src/server/controllers/s3.js#L165-L192
328
transloadit/uppy
packages/@uppy/companion/src/server/controllers/s3.js
abortMultipartUpload
function abortMultipartUpload (req, res, next) { // @ts-ignore The `uppy` property is added by middleware before reaching here. const client = req.uppy.s3Client const { uploadId } = req.params const { key } = req.query if (typeof key !== 'string') { return res.status(400).json({ error: 's3: t...
javascript
function abortMultipartUpload (req, res, next) { // @ts-ignore The `uppy` property is added by middleware before reaching here. const client = req.uppy.s3Client const { uploadId } = req.params const { key } = req.query if (typeof key !== 'string') { return res.status(400).json({ error: 's3: t...
[ "function", "abortMultipartUpload", "(", "req", ",", "res", ",", "next", ")", "{", "// @ts-ignore The `uppy` property is added by middleware before reaching here.", "const", "client", "=", "req", ".", "uppy", ".", "s3Client", "const", "{", "uploadId", "}", "=", "req",...
Abort a multipart upload, deleting already uploaded parts. Expected URL parameters: - uploadId - The uploadId returned from `createMultipartUpload`. Expected query parameters: - key - The object key in the S3 bucket. Response JSON: Empty.
[ "Abort", "a", "multipart", "upload", "deleting", "already", "uploaded", "parts", "." ]
7ae18bf992d544a64da998f033258ec09a3de275
https://github.com/transloadit/uppy/blob/7ae18bf992d544a64da998f033258ec09a3de275/packages/@uppy/companion/src/server/controllers/s3.js#L204-L225
329
transloadit/uppy
packages/@uppy/companion/src/server/controllers/s3.js
completeMultipartUpload
function completeMultipartUpload (req, res, next) { // @ts-ignore The `uppy` property is added by middleware before reaching here. const client = req.uppy.s3Client const { uploadId } = req.params const { key } = req.query const { parts } = req.body if (typeof key !== 'string') { return re...
javascript
function completeMultipartUpload (req, res, next) { // @ts-ignore The `uppy` property is added by middleware before reaching here. const client = req.uppy.s3Client const { uploadId } = req.params const { key } = req.query const { parts } = req.body if (typeof key !== 'string') { return re...
[ "function", "completeMultipartUpload", "(", "req", ",", "res", ",", "next", ")", "{", "// @ts-ignore The `uppy` property is added by middleware before reaching here.", "const", "client", "=", "req", ".", "uppy", ".", "s3Client", "const", "{", "uploadId", "}", "=", "re...
Complete a multipart upload, combining all the parts into a single object in the S3 bucket. Expected URL parameters: - uploadId - The uploadId returned from `createMultipartUpload`. Expected query parameters: - key - The object key in the S3 bucket. Expected JSON body: - parts - An array of parts, see the `getUploaded...
[ "Complete", "a", "multipart", "upload", "combining", "all", "the", "parts", "into", "a", "single", "object", "in", "the", "S3", "bucket", "." ]
7ae18bf992d544a64da998f033258ec09a3de275
https://github.com/transloadit/uppy/blob/7ae18bf992d544a64da998f033258ec09a3de275/packages/@uppy/companion/src/server/controllers/s3.js#L239-L269
330
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/utils.js
assertLoadedUrlEqual
function assertLoadedUrlEqual(controller, targetUrl) { var locationBar = new elementslib.ID(controller.window.document, "urlbar"); var currentURL = locationBar.getNode().value; // Load the target URL controller.open(targetUrl); controller.waitForPageLoad(); // Check the same web page has been opened con...
javascript
function assertLoadedUrlEqual(controller, targetUrl) { var locationBar = new elementslib.ID(controller.window.document, "urlbar"); var currentURL = locationBar.getNode().value; // Load the target URL controller.open(targetUrl); controller.waitForPageLoad(); // Check the same web page has been opened con...
[ "function", "assertLoadedUrlEqual", "(", "controller", ",", "targetUrl", ")", "{", "var", "locationBar", "=", "new", "elementslib", ".", "ID", "(", "controller", ".", "window", ".", "document", ",", "\"urlbar\"", ")", ";", "var", "currentURL", "=", "locationBa...
Assert if the current URL is identical to the target URL. With this function also redirects can be tested. @param {MozmillController} controller MozMillController of the window to operate on @param {string} targetURL URL to check
[ "Assert", "if", "the", "current", "URL", "is", "identical", "to", "the", "target", "URL", ".", "With", "this", "function", "also", "redirects", "can", "be", "tested", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/utils.js#L194-L205
331
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/utils.js
closeContentAreaContextMenu
function closeContentAreaContextMenu(controller) { var contextMenu = new elementslib.ID(controller.window.document, "contentAreaContextMenu"); controller.keypress(contextMenu, "VK_ESCAPE", {}); }
javascript
function closeContentAreaContextMenu(controller) { var contextMenu = new elementslib.ID(controller.window.document, "contentAreaContextMenu"); controller.keypress(contextMenu, "VK_ESCAPE", {}); }
[ "function", "closeContentAreaContextMenu", "(", "controller", ")", "{", "var", "contextMenu", "=", "new", "elementslib", ".", "ID", "(", "controller", ".", "window", ".", "document", ",", "\"contentAreaContextMenu\"", ")", ";", "controller", ".", "keypress", "(", ...
Close the context menu inside the content area of the currently open tab @param {MozmillController} controller MozMillController of the window to operate on
[ "Close", "the", "context", "menu", "inside", "the", "content", "area", "of", "the", "currently", "open", "tab" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/utils.js#L213-L216
332
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/utils.js
checkSearchField
function checkSearchField(controller, searchField, searchTerm, submitButton, timeout) { controller.waitThenClick(searchField, timeout); controller.type(searchField, searchTerm); if (submitButton != undefined...
javascript
function checkSearchField(controller, searchField, searchTerm, submitButton, timeout) { controller.waitThenClick(searchField, timeout); controller.type(searchField, searchTerm); if (submitButton != undefined...
[ "function", "checkSearchField", "(", "controller", ",", "searchField", ",", "searchTerm", ",", "submitButton", ",", "timeout", ")", "{", "controller", ".", "waitThenClick", "(", "searchField", ",", "timeout", ")", ";", "controller", ".", "type", "(", "searchFiel...
Run tests against a given search form @param {MozMillController} controller MozMillController of the window to operate on @param {ElemBase} searchField The HTML input form element to test @param {string} searchTerm The search term for the test @param {ElemBase} submitButton (Optional) The forms submit button @param {n...
[ "Run", "tests", "against", "a", "given", "search", "form" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/utils.js#L232-L241
333
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/utils.js
createURI
function createURI(spec, originCharset, baseURI) { let iosvc = Cc["@mozilla.org/network/io-service;1"]. getService(Ci.nsIIOService); return iosvc.newURI(spec, originCharset, baseURI); }
javascript
function createURI(spec, originCharset, baseURI) { let iosvc = Cc["@mozilla.org/network/io-service;1"]. getService(Ci.nsIIOService); return iosvc.newURI(spec, originCharset, baseURI); }
[ "function", "createURI", "(", "spec", ",", "originCharset", ",", "baseURI", ")", "{", "let", "iosvc", "=", "Cc", "[", "\"@mozilla.org/network/io-service;1\"", "]", ".", "getService", "(", "Ci", ".", "nsIIOService", ")", ";", "return", "iosvc", ".", "newURI", ...
Create a new URI @param {string} spec The URI string in UTF-8 encoding. @param {string} originCharset The charset of the document from which this URI string originated. @param {string} baseURI If null, spec must specify an absolute URI. Otherwise, spec may be resolved relative to baseURI, depending on the protocol. @r...
[ "Create", "a", "new", "URI" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/utils.js#L256-L262
334
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/utils.js
formatUrlPref
function formatUrlPref(prefName) { var formatter = Cc["@mozilla.org/toolkit/URLFormatterService;1"] .getService(Ci.nsIURLFormatter); return formatter.formatURLPref(prefName); }
javascript
function formatUrlPref(prefName) { var formatter = Cc["@mozilla.org/toolkit/URLFormatterService;1"] .getService(Ci.nsIURLFormatter); return formatter.formatURLPref(prefName); }
[ "function", "formatUrlPref", "(", "prefName", ")", "{", "var", "formatter", "=", "Cc", "[", "\"@mozilla.org/toolkit/URLFormatterService;1\"", "]", ".", "getService", "(", "Ci", ".", "nsIURLFormatter", ")", ";", "return", "formatter", ".", "formatURLPref", "(", "pr...
Format a URL by replacing all placeholders @param {string} prefName The preference name which contains the URL @return The formatted URL @type string
[ "Format", "a", "URL", "by", "replacing", "all", "placeholders" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/utils.js#L281-L286
335
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/utils.js
getDefaultHomepage
function getDefaultHomepage() { var preferences = prefs.preferences; var prefValue = preferences.getPref("browser.startup.homepage", "", true, Ci.nsIPrefLocalizedString); return prefValue.data; }
javascript
function getDefaultHomepage() { var preferences = prefs.preferences; var prefValue = preferences.getPref("browser.startup.homepage", "", true, Ci.nsIPrefLocalizedString); return prefValue.data; }
[ "function", "getDefaultHomepage", "(", ")", "{", "var", "preferences", "=", "prefs", ".", "preferences", ";", "var", "prefValue", "=", "preferences", ".", "getPref", "(", "\"browser.startup.homepage\"", ",", "\"\"", ",", "true", ",", "Ci", ".", "nsIPrefLocalized...
Returns the default home page @return The URL of the default homepage @type string
[ "Returns", "the", "default", "home", "page" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/utils.js#L294-L300
336
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/utils.js
getEntity
function getEntity(urls, entityId) { // Add xhtml11.dtd to prevent missing entity errors with XHTML files urls.push("resource:///res/dtd/xhtml11.dtd"); // Build a string of external entities var extEntities = ""; for (i = 0; i < urls.length; i++) { extEntities += '<!ENTITY % dtd' + i + ' SYSTEM "' + ...
javascript
function getEntity(urls, entityId) { // Add xhtml11.dtd to prevent missing entity errors with XHTML files urls.push("resource:///res/dtd/xhtml11.dtd"); // Build a string of external entities var extEntities = ""; for (i = 0; i < urls.length; i++) { extEntities += '<!ENTITY % dtd' + i + ' SYSTEM "' + ...
[ "function", "getEntity", "(", "urls", ",", "entityId", ")", "{", "// Add xhtml11.dtd to prevent missing entity errors with XHTML files", "urls", ".", "push", "(", "\"resource:///res/dtd/xhtml11.dtd\"", ")", ";", "// Build a string of external entities", "var", "extEntities", "=...
Returns the value of an individual entity in a DTD file. @param [string] urls Array of DTD urls. @param {string} entityId The ID of the entity to get the value of. @return The value of the requested entity @type string
[ "Returns", "the", "value", "of", "an", "individual", "entity", "in", "a", "DTD", "file", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/utils.js#L313-L335
337
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/utils.js
getProperty
function getProperty(url, prefName) { var sbs = Cc["@mozilla.org/intl/stringbundle;1"] .getService(Ci.nsIStringBundleService); var bundle = sbs.createBundle(url); try { return bundle.GetStringFromName(prefName); } catch (ex) { throw new Error(arguments.callee.name + ": Unknown property - " ...
javascript
function getProperty(url, prefName) { var sbs = Cc["@mozilla.org/intl/stringbundle;1"] .getService(Ci.nsIStringBundleService); var bundle = sbs.createBundle(url); try { return bundle.GetStringFromName(prefName); } catch (ex) { throw new Error(arguments.callee.name + ": Unknown property - " ...
[ "function", "getProperty", "(", "url", ",", "prefName", ")", "{", "var", "sbs", "=", "Cc", "[", "\"@mozilla.org/intl/stringbundle;1\"", "]", ".", "getService", "(", "Ci", ".", "nsIStringBundleService", ")", ";", "var", "bundle", "=", "sbs", ".", "createBundle"...
Returns the value of an individual property. @param {string} url URL of the string bundle. @param {string} prefName The property to get the value of. @return The value of the requested property @type string
[ "Returns", "the", "value", "of", "an", "individual", "property", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/utils.js#L348-L358
338
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/utils.js
handleWindow
function handleWindow(type, text, callback, dontClose) { // Set the window opener function to use depending on the type var func_ptr = null; switch (type) { case "type": func_ptr = mozmill.utils.getWindowByType; break; case "title": func_ptr = mozmill.utils.getWindowByTitle; break;...
javascript
function handleWindow(type, text, callback, dontClose) { // Set the window opener function to use depending on the type var func_ptr = null; switch (type) { case "type": func_ptr = mozmill.utils.getWindowByType; break; case "title": func_ptr = mozmill.utils.getWindowByTitle; break;...
[ "function", "handleWindow", "(", "type", ",", "text", ",", "callback", ",", "dontClose", ")", "{", "// Set the window opener function to use depending on the type", "var", "func_ptr", "=", "null", ";", "switch", "(", "type", ")", "{", "case", "\"type\"", ":", "fun...
Function to handle non-modal windows @param {string} type Specifies how to check for the new window (possible values: type or title) @param {string} text The window type of title string to search for @param {function} callback (optional) Callback function to call for window specific tests @param {boolean} dontClose (o...
[ "Function", "to", "handle", "non", "-", "modal", "windows" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/utils.js#L373-L425
339
SeleniumHQ/selenium
javascript/node/selenium-webdriver/firefox.js
createExecutor
function createExecutor(serverUrl) { let client = serverUrl.then(url => new http.HttpClient(url)); let executor = new http.Executor(client); configureExecutor(executor); return executor; }
javascript
function createExecutor(serverUrl) { let client = serverUrl.then(url => new http.HttpClient(url)); let executor = new http.Executor(client); configureExecutor(executor); return executor; }
[ "function", "createExecutor", "(", "serverUrl", ")", "{", "let", "client", "=", "serverUrl", ".", "then", "(", "url", "=>", "new", "http", ".", "HttpClient", "(", "url", ")", ")", ";", "let", "executor", "=", "new", "http", ".", "Executor", "(", "clien...
Creates a command executor with support for Marionette's custom commands. @param {!Promise<string>} serverUrl The server's URL. @return {!command.Executor} The new command executor.
[ "Creates", "a", "command", "executor", "with", "support", "for", "Marionette", "s", "custom", "commands", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/node/selenium-webdriver/firefox.js#L470-L475
340
SeleniumHQ/selenium
javascript/node/selenium-webdriver/firefox.js
configureExecutor
function configureExecutor(executor) { executor.defineCommand( ExtensionCommand.GET_CONTEXT, 'GET', '/session/:sessionId/moz/context'); executor.defineCommand( ExtensionCommand.SET_CONTEXT, 'POST', '/session/:sessionId/moz/context'); executor.defineCommand( ExtensionCom...
javascript
function configureExecutor(executor) { executor.defineCommand( ExtensionCommand.GET_CONTEXT, 'GET', '/session/:sessionId/moz/context'); executor.defineCommand( ExtensionCommand.SET_CONTEXT, 'POST', '/session/:sessionId/moz/context'); executor.defineCommand( ExtensionCom...
[ "function", "configureExecutor", "(", "executor", ")", "{", "executor", ".", "defineCommand", "(", "ExtensionCommand", ".", "GET_CONTEXT", ",", "'GET'", ",", "'/session/:sessionId/moz/context'", ")", ";", "executor", ".", "defineCommand", "(", "ExtensionCommand", ".",...
Configures the given executor with Firefox-specific commands. @param {!http.Executor} executor the executor to configure.
[ "Configures", "the", "given", "executor", "with", "Firefox", "-", "specific", "commands", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/node/selenium-webdriver/firefox.js#L482-L502
341
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/tabview.js
tabView_open
function tabView_open() { var menuitem = new elementslib.Elem(this._controller.menus['view-menu'].menu_tabview); this._controller.click(menuitem); this.waitForOpened(); this._tabView = this.getElement({type: "tabView"}); this._tabViewDoc = this._tabView.getNode().webNavigation.document; }
javascript
function tabView_open() { var menuitem = new elementslib.Elem(this._controller.menus['view-menu'].menu_tabview); this._controller.click(menuitem); this.waitForOpened(); this._tabView = this.getElement({type: "tabView"}); this._tabViewDoc = this._tabView.getNode().webNavigation.document; }
[ "function", "tabView_open", "(", ")", "{", "var", "menuitem", "=", "new", "elementslib", ".", "Elem", "(", "this", ".", "_controller", ".", "menus", "[", "'view-menu'", "]", ".", "menu_tabview", ")", ";", "this", ".", "_controller", ".", "click", "(", "m...
Open the Tab View
[ "Open", "the", "Tab", "View" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/tabview.js#L86-L93
342
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/tabview.js
tabView_waitForOpened
function tabView_waitForOpened() { // Add event listener to wait until the tabview has been opened var self = { opened: false }; function checkOpened() { self.opened = true; } this._controller.window.addEventListener("tabviewshown", checkOpened, false); try { mozmill.utils.waitFor(function() ...
javascript
function tabView_waitForOpened() { // Add event listener to wait until the tabview has been opened var self = { opened: false }; function checkOpened() { self.opened = true; } this._controller.window.addEventListener("tabviewshown", checkOpened, false); try { mozmill.utils.waitFor(function() ...
[ "function", "tabView_waitForOpened", "(", ")", "{", "// Add event listener to wait until the tabview has been opened", "var", "self", "=", "{", "opened", ":", "false", "}", ";", "function", "checkOpened", "(", ")", "{", "self", ".", "opened", "=", "true", ";", "}"...
Wait until the Tab View has been opened
[ "Wait", "until", "the", "Tab", "View", "has", "been", "opened" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/tabview.js#L98-L115
343
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/tabview.js
tabView_close
function tabView_close() { var menuitem = new elementslib.Elem(this._controller.menus['view-menu'].menu_tabview); this._controller.click(menuitem); this.waitForClosed(); this._tabView = null; this._tabViewDoc = this._controller.window.document; }
javascript
function tabView_close() { var menuitem = new elementslib.Elem(this._controller.menus['view-menu'].menu_tabview); this._controller.click(menuitem); this.waitForClosed(); this._tabView = null; this._tabViewDoc = this._controller.window.document; }
[ "function", "tabView_close", "(", ")", "{", "var", "menuitem", "=", "new", "elementslib", ".", "Elem", "(", "this", ".", "_controller", ".", "menus", "[", "'view-menu'", "]", ".", "menu_tabview", ")", ";", "this", ".", "_controller", ".", "click", "(", "...
Close the Tab View
[ "Close", "the", "Tab", "View" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/tabview.js#L120-L127
344
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/tabview.js
tabView_waitForClosed
function tabView_waitForClosed() { // Add event listener to wait until the tabview has been closed var self = { closed: false }; function checkClosed() { self.closed = true; } this._controller.window.addEventListener("tabviewhidden", checkClosed, false); try { mozmill.utils.waitFor(function()...
javascript
function tabView_waitForClosed() { // Add event listener to wait until the tabview has been closed var self = { closed: false }; function checkClosed() { self.closed = true; } this._controller.window.addEventListener("tabviewhidden", checkClosed, false); try { mozmill.utils.waitFor(function()...
[ "function", "tabView_waitForClosed", "(", ")", "{", "// Add event listener to wait until the tabview has been closed", "var", "self", "=", "{", "closed", ":", "false", "}", ";", "function", "checkClosed", "(", ")", "{", "self", ".", "closed", "=", "true", ";", "}"...
Wait until the Tab View has been closed
[ "Wait", "until", "the", "Tab", "View", "has", "been", "closed" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/tabview.js#L132-L149
345
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/tabview.js
tabView_getGroupTitleBox
function tabView_getGroupTitleBox(aSpec) { var spec = aSpec || {}; var group = spec.group; if (!group) { throw new Error(arguments.callee.name + ": Group not specified."); } return this.getElement({ type: "group_titleBox", parent: spec.group }); }
javascript
function tabView_getGroupTitleBox(aSpec) { var spec = aSpec || {}; var group = spec.group; if (!group) { throw new Error(arguments.callee.name + ": Group not specified."); } return this.getElement({ type: "group_titleBox", parent: spec.group }); }
[ "function", "tabView_getGroupTitleBox", "(", "aSpec", ")", "{", "var", "spec", "=", "aSpec", "||", "{", "}", ";", "var", "group", "=", "spec", ".", "group", ";", "if", "(", "!", "group", ")", "{", "throw", "new", "Error", "(", "arguments", ".", "call...
Retrieve the group's title box @param {object} aSpec Information on which group to operate on Elements: group - Group element @returns Group title box @type {ElemBase}
[ "Retrieve", "the", "group", "s", "title", "box" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/tabview.js#L190-L202
346
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/tabview.js
tabView_closeGroup
function tabView_closeGroup(aSpec) { var spec = aSpec || {}; var group = spec.group; if (!group) { throw new Error(arguments.callee.name + ": Group not specified."); } var button = this.getElement({ type: "group_closeButton", value: group }); this._controller.click(button...
javascript
function tabView_closeGroup(aSpec) { var spec = aSpec || {}; var group = spec.group; if (!group) { throw new Error(arguments.callee.name + ": Group not specified."); } var button = this.getElement({ type: "group_closeButton", value: group }); this._controller.click(button...
[ "function", "tabView_closeGroup", "(", "aSpec", ")", "{", "var", "spec", "=", "aSpec", "||", "{", "}", ";", "var", "group", "=", "spec", ".", "group", ";", "if", "(", "!", "group", ")", "{", "throw", "new", "Error", "(", "arguments", ".", "callee", ...
Close the specified tab group @param {object} aSpec Information on which group to operate on Elements: group - Group
[ "Close", "the", "specified", "tab", "group" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/tabview.js#L211-L226
347
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/tabview.js
tabView_undoCloseGroup
function tabView_undoCloseGroup(aSpec) { var spec = aSpec || {}; var group = spec.group; if (!group) { throw new Error(arguments.callee.name + ": Group not specified."); } var undo = this.getElement({ type: "group_undoButton", value: group }); this._controller.click(undo)...
javascript
function tabView_undoCloseGroup(aSpec) { var spec = aSpec || {}; var group = spec.group; if (!group) { throw new Error(arguments.callee.name + ": Group not specified."); } var undo = this.getElement({ type: "group_undoButton", value: group }); this._controller.click(undo)...
[ "function", "tabView_undoCloseGroup", "(", "aSpec", ")", "{", "var", "spec", "=", "aSpec", "||", "{", "}", ";", "var", "group", "=", "spec", ".", "group", ";", "if", "(", "!", "group", ")", "{", "throw", "new", "Error", "(", "arguments", ".", "callee...
Undo the closing of the specified tab group @param {object} aSpec Information on which group to operate on Elements: group - Group
[ "Undo", "the", "closing", "of", "the", "specified", "tab", "group" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/tabview.js#L265-L280
348
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/tabview.js
tabView_waitForGroupUndo
function tabView_waitForGroupUndo(aSpec) { var spec = aSpec || {}; var group = spec.group; if (!group) { throw new Error(arguments.callee.name + ": Group not specified."); } var element = null; this._groupItemsObject.groupItems.forEach(function(node) { if (node.container == group.g...
javascript
function tabView_waitForGroupUndo(aSpec) { var spec = aSpec || {}; var group = spec.group; if (!group) { throw new Error(arguments.callee.name + ": Group not specified."); } var element = null; this._groupItemsObject.groupItems.forEach(function(node) { if (node.container == group.g...
[ "function", "tabView_waitForGroupUndo", "(", "aSpec", ")", "{", "var", "spec", "=", "aSpec", "||", "{", "}", ";", "var", "group", "=", "spec", ".", "group", ";", "if", "(", "!", "group", ")", "{", "throw", "new", "Error", "(", "arguments", ".", "call...
Wait until the specified tab group has been reopened @param {object} aSpec Information on which group to operate on Elements: group - Group
[ "Wait", "until", "the", "specified", "tab", "group", "has", "been", "reopened" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/tabview.js#L289-L310
349
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/tabview.js
tabView_closeTab
function tabView_closeTab(aSpec) { var spec = aSpec || {}; var tab = spec.tab; if (!tab) { throw new Error(arguments.callee.name + ": Tab not specified."); } var button = this.getElement({ type: "tab_closeButton", value: tab} ); this._controller.click(button); }
javascript
function tabView_closeTab(aSpec) { var spec = aSpec || {}; var tab = spec.tab; if (!tab) { throw new Error(arguments.callee.name + ": Tab not specified."); } var button = this.getElement({ type: "tab_closeButton", value: tab} ); this._controller.click(button); }
[ "function", "tabView_closeTab", "(", "aSpec", ")", "{", "var", "spec", "=", "aSpec", "||", "{", "}", ";", "var", "tab", "=", "spec", ".", "tab", ";", "if", "(", "!", "tab", ")", "{", "throw", "new", "Error", "(", "arguments", ".", "callee", ".", ...
Close a tab @param {object} aSpec Information about the element to operate on Elements: tab - Tab to close
[ "Close", "a", "tab" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/tabview.js#L348-L361
350
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/tabview.js
tabView_getTabTitleBox
function tabView_getTabTitleBox(aSpec) { var spec = aSpec || {}; var tab = spec.tab; if (!tab) { throw new Error(arguments.callee.name + ": Tab not specified."); } return this.getElement({ type: "tab_titleBox", parent: spec.tab }); }
javascript
function tabView_getTabTitleBox(aSpec) { var spec = aSpec || {}; var tab = spec.tab; if (!tab) { throw new Error(arguments.callee.name + ": Tab not specified."); } return this.getElement({ type: "tab_titleBox", parent: spec.tab }); }
[ "function", "tabView_getTabTitleBox", "(", "aSpec", ")", "{", "var", "spec", "=", "aSpec", "||", "{", "}", ";", "var", "tab", "=", "spec", ".", "tab", ";", "if", "(", "!", "tab", ")", "{", "throw", "new", "Error", "(", "arguments", ".", "callee", "...
Retrieve the tab's title box @param {object} aSpec Information on which tab to operate on Elements: tab - Tab @returns Tab title box @type {ElemBase}
[ "Retrieve", "the", "tab", "s", "title", "box" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/tabview.js#L373-L385
351
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/tabview.js
tabView_openTab
function tabView_openTab(aSpec) { var spec = aSpec || {}; var group = spec.group; if (!group) { throw new Error(arguments.callee.name + ": Group not specified."); } var button = this.getElement({ type: "group_newTabButton", value: group }); this._controller.click(button)...
javascript
function tabView_openTab(aSpec) { var spec = aSpec || {}; var group = spec.group; if (!group) { throw new Error(arguments.callee.name + ": Group not specified."); } var button = this.getElement({ type: "group_newTabButton", value: group }); this._controller.click(button)...
[ "function", "tabView_openTab", "(", "aSpec", ")", "{", "var", "spec", "=", "aSpec", "||", "{", "}", ";", "var", "group", "=", "spec", ".", "group", ";", "if", "(", "!", "group", ")", "{", "throw", "new", "Error", "(", "arguments", ".", "callee", "....
Open a new tab in the specified group @param {object} aSpec Information about the element to operate on Elements: group - Group to create a new tab in
[ "Open", "a", "new", "tab", "in", "the", "specified", "group" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/tabview.js#L394-L409
352
SeleniumHQ/selenium
javascript/atoms/events.js
createNativeTouchList
function createNativeTouchList(touchListArgs) { var touches = goog.array.map(touchListArgs, function(touchArg) { return doc.createTouch(view, target, touchArg.identifier, touchArg.pageX, touchArg.pageY, touchArg.screenX, touchArg.screenY); }); return doc.createTouchList.apply(doc, touches);...
javascript
function createNativeTouchList(touchListArgs) { var touches = goog.array.map(touchListArgs, function(touchArg) { return doc.createTouch(view, target, touchArg.identifier, touchArg.pageX, touchArg.pageY, touchArg.screenX, touchArg.screenY); }); return doc.createTouchList.apply(doc, touches);...
[ "function", "createNativeTouchList", "(", "touchListArgs", ")", "{", "var", "touches", "=", "goog", ".", "array", ".", "map", "(", "touchListArgs", ",", "function", "(", "touchArg", ")", "{", "return", "doc", ".", "createTouch", "(", "view", ",", "target", ...
Creates a TouchList, using native touch Api, for touch events.
[ "Creates", "a", "TouchList", "using", "native", "touch", "Api", "for", "touch", "events", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/atoms/events.js#L493-L500
353
SeleniumHQ/selenium
javascript/atoms/events.js
createGenericTouchList
function createGenericTouchList(touchListArgs) { var touches = goog.array.map(touchListArgs, function(touchArg) { // The target field is not part of the W3C spec, but both android and iOS // add the target field to each touch. return { identifier: touchArg.identifier, screenX: touc...
javascript
function createGenericTouchList(touchListArgs) { var touches = goog.array.map(touchListArgs, function(touchArg) { // The target field is not part of the W3C spec, but both android and iOS // add the target field to each touch. return { identifier: touchArg.identifier, screenX: touc...
[ "function", "createGenericTouchList", "(", "touchListArgs", ")", "{", "var", "touches", "=", "goog", ".", "array", ".", "map", "(", "touchListArgs", ",", "function", "(", "touchArg", ")", "{", "// The target field is not part of the W3C spec, but both android and iOS", ...
Creates a TouchList, using simulated touch Api, for touch events.
[ "Creates", "a", "TouchList", "using", "simulated", "touch", "Api", "for", "touch", "events", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/atoms/events.js#L503-L522
354
SeleniumHQ/selenium
third_party/closure/goog/net/streams/pbjsonstreamparser.js
function() { /** * Protobuf raw bytes stream parser * @private {?JsonStreamParser} */ this.jsonStreamParser_ = null; /** * The current error message, if any. * @private {?string} */ this.errorMessage_ = null; /** * The current position in the streamed data. * @private {number} */ ...
javascript
function() { /** * Protobuf raw bytes stream parser * @private {?JsonStreamParser} */ this.jsonStreamParser_ = null; /** * The current error message, if any. * @private {?string} */ this.errorMessage_ = null; /** * The current position in the streamed data. * @private {number} */ ...
[ "function", "(", ")", "{", "/**\n * Protobuf raw bytes stream parser\n * @private {?JsonStreamParser}\n */", "this", ".", "jsonStreamParser_", "=", "null", ";", "/**\n * The current error message, if any.\n * @private {?string}\n */", "this", ".", "errorMessage_", "=", "n...
A stream parser of StreamBody message in Protobuf-JSON format. @constructor @struct @implements {StreamParser} @final
[ "A", "stream", "parser", "of", "StreamBody", "message", "in", "Protobuf", "-", "JSON", "format", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/closure/goog/net/streams/pbjsonstreamparser.js#L52-L88
355
SeleniumHQ/selenium
third_party/closure/goog/net/streams/pbjsonstreamparser.js
readMore
function readMore() { while (pos < input.length) { if (!utils.isJsonWhitespace(input[pos])) { return true; } pos++; parser.streamPos_++; } return false; }
javascript
function readMore() { while (pos < input.length) { if (!utils.isJsonWhitespace(input[pos])) { return true; } pos++; parser.streamPos_++; } return false; }
[ "function", "readMore", "(", ")", "{", "while", "(", "pos", "<", "input", ".", "length", ")", "{", "if", "(", "!", "utils", ".", "isJsonWhitespace", "(", "input", "[", "pos", "]", ")", ")", "{", "return", "true", ";", "}", "pos", "++", ";", "pars...
Advances to the first non-whitespace input character. @return {boolean} return false if no more non-whitespace input character
[ "Advances", "to", "the", "first", "non", "-", "whitespace", "input", "character", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/closure/goog/net/streams/pbjsonstreamparser.js#L240-L249
356
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/modal-dialog.js
mdObserver
function mdObserver(aOpener, aCallback) { this._opener = aOpener; this._callback = aCallback; this._timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer); this.exception = null; this.finished = false; }
javascript
function mdObserver(aOpener, aCallback) { this._opener = aOpener; this._callback = aCallback; this._timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer); this.exception = null; this.finished = false; }
[ "function", "mdObserver", "(", "aOpener", ",", "aCallback", ")", "{", "this", ".", "_opener", "=", "aOpener", ";", "this", ".", "_callback", "=", "aCallback", ";", "this", ".", "_timer", "=", "Cc", "[", "\"@mozilla.org/timer;1\"", "]", ".", "createInstance",...
Observer object to find the modal dialog spawned by a controller @constructor @class Observer used to find a modal dialog @param {object} aOpener Window which is the opener of the modal dialog @param {function} aCallback The callback handler to use to interact with the modal dialog
[ "Observer", "object", "to", "find", "the", "modal", "dialog", "spawned", "by", "a", "controller" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/modal-dialog.js#L55-L62
357
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/modal-dialog.js
mdObserver_findWindow
function mdObserver_findWindow() { // If a window has been opened from content, it has to be unwrapped. var window = domUtils.unwrapNode(mozmill.wm.getMostRecentWindow('')); // Get the WebBrowserChrome and check if it's a modal window var chrome = window.QueryInterface(Ci.nsIInterfaceRequestor). ...
javascript
function mdObserver_findWindow() { // If a window has been opened from content, it has to be unwrapped. var window = domUtils.unwrapNode(mozmill.wm.getMostRecentWindow('')); // Get the WebBrowserChrome and check if it's a modal window var chrome = window.QueryInterface(Ci.nsIInterfaceRequestor). ...
[ "function", "mdObserver_findWindow", "(", ")", "{", "// If a window has been opened from content, it has to be unwrapped.", "var", "window", "=", "domUtils", ".", "unwrapNode", "(", "mozmill", ".", "wm", ".", "getMostRecentWindow", "(", "''", ")", ")", ";", "// Get the ...
Check if the modal dialog has been opened @returns {object} The modal dialog window found, or null.
[ "Check", "if", "the", "modal", "dialog", "has", "been", "opened" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/modal-dialog.js#L71-L102
358
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/modal-dialog.js
mdObserver_observe
function mdObserver_observe(aSubject, aTopic, aData) { // Once the window has been found and loaded we can execute the callback var window = this.findWindow(); if (window && ("documentLoaded" in window)) { try { this._callback(new mozmill.controller.MozMillController(window)); } ca...
javascript
function mdObserver_observe(aSubject, aTopic, aData) { // Once the window has been found and loaded we can execute the callback var window = this.findWindow(); if (window && ("documentLoaded" in window)) { try { this._callback(new mozmill.controller.MozMillController(window)); } ca...
[ "function", "mdObserver_observe", "(", "aSubject", ",", "aTopic", ",", "aData", ")", "{", "// Once the window has been found and loaded we can execute the callback", "var", "window", "=", "this", ".", "findWindow", "(", ")", ";", "if", "(", "window", "&&", "(", "\"d...
Called by the timer in the given interval to check if the modal dialog has been opened. Once it has been found the callback gets executed @param {object} aSubject Not used. @param {string} aTopic Not used. @param {string} aData Not used.
[ "Called", "by", "the", "timer", "in", "the", "given", "interval", "to", "check", "if", "the", "modal", "dialog", "has", "been", "opened", ".", "Once", "it", "has", "been", "found", "the", "callback", "gets", "executed" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/modal-dialog.js#L112-L136
359
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/modal-dialog.js
modalDialog_start
function modalDialog_start(aCallback) { if (!aCallback) throw new Error(arguments.callee.name + ": Callback not specified."); this._observer = new mdObserver(this._window, aCallback); this._timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer); this._timer.init(this._observer, DELAY_CHE...
javascript
function modalDialog_start(aCallback) { if (!aCallback) throw new Error(arguments.callee.name + ": Callback not specified."); this._observer = new mdObserver(this._window, aCallback); this._timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer); this._timer.init(this._observer, DELAY_CHE...
[ "function", "modalDialog_start", "(", "aCallback", ")", "{", "if", "(", "!", "aCallback", ")", "throw", "new", "Error", "(", "arguments", ".", "callee", ".", "name", "+", "\": Callback not specified.\"", ")", ";", "this", ".", "_observer", "=", "new", "mdObs...
Start timer to wait for the modal dialog. @param {function} aCallback The callback handler to use to interact with the modal dialog
[ "Start", "timer", "to", "wait", "for", "the", "modal", "dialog", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/modal-dialog.js#L177-L185
360
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/modal-dialog.js
modalDialog_waitForDialog
function modalDialog_waitForDialog(aTimeout) { var timeout = aTimeout || TIMEOUT_MODAL_DIALOG; if (!this._observer) { return; } try { mozmill.utils.waitFor(function () { return this.finished; }, "Modal dialog has been found and processed", timeout, undefined, this); //...
javascript
function modalDialog_waitForDialog(aTimeout) { var timeout = aTimeout || TIMEOUT_MODAL_DIALOG; if (!this._observer) { return; } try { mozmill.utils.waitFor(function () { return this.finished; }, "Modal dialog has been found and processed", timeout, undefined, this); //...
[ "function", "modalDialog_waitForDialog", "(", "aTimeout", ")", "{", "var", "timeout", "=", "aTimeout", "||", "TIMEOUT_MODAL_DIALOG", ";", "if", "(", "!", "this", ".", "_observer", ")", "{", "return", ";", "}", "try", "{", "mozmill", ".", "utils", ".", "wai...
Wait until the modal dialog has been processed. @param {Number} aTimeout (optional - default 5s) Duration to wait
[ "Wait", "until", "the", "modal", "dialog", "has", "been", "processed", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/modal-dialog.js#L205-L225
361
SeleniumHQ/selenium
javascript/selenium-core/lib/prototype.js
function(event, tagName) { var element = Event.element(event); while (element.parentNode && (!element.tagName || (element.tagName.toUpperCase() != tagName.toUpperCase()))) element = element.parentNode; return element; }
javascript
function(event, tagName) { var element = Event.element(event); while (element.parentNode && (!element.tagName || (element.tagName.toUpperCase() != tagName.toUpperCase()))) element = element.parentNode; return element; }
[ "function", "(", "event", ",", "tagName", ")", "{", "var", "element", "=", "Event", ".", "element", "(", "event", ")", ";", "while", "(", "element", ".", "parentNode", "&&", "(", "!", "element", ".", "tagName", "||", "(", "element", ".", "tagName", "...
find the first node with the given tagName, starting from the node the event was triggered on; traverses the DOM upwards
[ "find", "the", "first", "node", "with", "the", "given", "tagName", "starting", "from", "the", "node", "the", "event", "was", "triggered", "on", ";", "traverses", "the", "DOM", "upwards" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/lib/prototype.js#L1714-L1720
362
SeleniumHQ/selenium
javascript/selenium-core/lib/prototype.js
function() { this.deltaX = window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0; this.deltaY = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop ...
javascript
function() { this.deltaX = window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0; this.deltaY = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop ...
[ "function", "(", ")", "{", "this", ".", "deltaX", "=", "window", ".", "pageXOffset", "||", "document", ".", "documentElement", ".", "scrollLeft", "||", "document", ".", "body", ".", "scrollLeft", "||", "0", ";", "this", ".", "deltaY", "=", "window", ".",...
must be called before calling withinIncludingScrolloffset, every time the page is scrolled
[ "must", "be", "called", "before", "calling", "withinIncludingScrolloffset", "every", "time", "the", "page", "is", "scrolled" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/lib/prototype.js#L1784-L1793
363
SeleniumHQ/selenium
javascript/selenium-core/lib/prototype.js
function(mode, element) { if (!mode) return 0; if (mode == 'vertical') return ((this.offset[1] + element.offsetHeight) - this.ycomp) / element.offsetHeight; if (mode == 'horizontal') return ((this.offset[0] + element.offsetWidth) - this.xcomp) / element.offsetWidth; }
javascript
function(mode, element) { if (!mode) return 0; if (mode == 'vertical') return ((this.offset[1] + element.offsetHeight) - this.ycomp) / element.offsetHeight; if (mode == 'horizontal') return ((this.offset[0] + element.offsetWidth) - this.xcomp) / element.offsetWidth; }
[ "function", "(", "mode", ",", "element", ")", "{", "if", "(", "!", "mode", ")", "return", "0", ";", "if", "(", "mode", "==", "'vertical'", ")", "return", "(", "(", "this", ".", "offset", "[", "1", "]", "+", "element", ".", "offsetHeight", ")", "-...
within must be called directly before
[ "within", "must", "be", "called", "directly", "before" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/lib/prototype.js#L1868-L1876
364
SeleniumHQ/selenium
javascript/selenium-core/scripts/ui-element.js
UIArgument
function UIArgument(uiArgumentShorthand, localVars) { /** * @param uiArgumentShorthand * * @throws UIArgumentException */ this.validate = function(uiArgumentShorthand) { var msg = "UIArgument validation error:\n" + print_r(uiArgumentShorthand); // tr...
javascript
function UIArgument(uiArgumentShorthand, localVars) { /** * @param uiArgumentShorthand * * @throws UIArgumentException */ this.validate = function(uiArgumentShorthand) { var msg = "UIArgument validation error:\n" + print_r(uiArgumentShorthand); // tr...
[ "function", "UIArgument", "(", "uiArgumentShorthand", ",", "localVars", ")", "{", "/**\n * @param uiArgumentShorthand\n *\n * @throws UIArgumentException\n */", "this", ".", "validate", "=", "function", "(", "uiArgumentShorthand", ")", "{", "var", "msg", "=",...
Constructs a UIArgument. This is mostly for checking that the values are valid. @param uiArgumentShorthand @param localVars @throws UIArgumentException
[ "Constructs", "a", "UIArgument", ".", "This", "is", "mostly", "for", "checking", "that", "the", "values", "are", "valid", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/scripts/ui-element.js#L530-L586
365
SeleniumHQ/selenium
javascript/selenium-core/scripts/ui-element.js
UISpecifier
function UISpecifier(uiSpecifierStringOrPagesetName, elementName, args) { /** * Initializes this object from a UI specifier string of the form: * * pagesetName::elementName(arg1=value1, arg2=value2, ...) * * into its component parts, and returns them as an object. * * @return ...
javascript
function UISpecifier(uiSpecifierStringOrPagesetName, elementName, args) { /** * Initializes this object from a UI specifier string of the form: * * pagesetName::elementName(arg1=value1, arg2=value2, ...) * * into its component parts, and returns them as an object. * * @return ...
[ "function", "UISpecifier", "(", "uiSpecifierStringOrPagesetName", ",", "elementName", ",", "args", ")", "{", "/**\n * Initializes this object from a UI specifier string of the form:\n *\n * pagesetName::elementName(arg1=value1, arg2=value2, ...)\n *\n * into its component...
The UISpecifier constructor is overloaded. If less than three arguments are provided, the first argument will be considered a UI specifier string, and will be split out accordingly. Otherwise, the first argument will be considered the path. @param uiSpecifierStringOrPagesetName a UI specifier string, or the pageset n...
[ "The", "UISpecifier", "constructor", "is", "overloaded", ".", "If", "less", "than", "three", "arguments", "are", "provided", "the", "first", "argument", "will", "be", "considered", "a", "UI", "specifier", "string", "and", "will", "be", "split", "out", "accordi...
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/scripts/ui-element.js#L603-L675
366
SeleniumHQ/selenium
javascript/selenium-core/scripts/ui-element.js
UIMap
function UIMap() { // the singleton pattern, split into two parts so that "new" can still // be used, in addition to "getInstance()" UIMap.self = this; // need to attach variables directly to the Editor object in order for them // to be in scope for Editor methods if (is_IDE()) { Ed...
javascript
function UIMap() { // the singleton pattern, split into two parts so that "new" can still // be used, in addition to "getInstance()" UIMap.self = this; // need to attach variables directly to the Editor object in order for them // to be in scope for Editor methods if (is_IDE()) { Ed...
[ "function", "UIMap", "(", ")", "{", "// the singleton pattern, split into two parts so that \"new\" can still", "// be used, in addition to \"getInstance()\"", "UIMap", ".", "self", "=", "this", ";", "// need to attach variables directly to the Editor object in order for them", "// to be...
Construct the UI map object, and return it. Once the object is instantiated, it binds to a global variable and will not leave scope. @return new UIMap object
[ "Construct", "the", "UI", "map", "object", "and", "return", "it", ".", "Once", "the", "object", "is", "instantiated", "it", "binds", "to", "a", "global", "variable", "and", "will", "not", "leave", "scope", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/scripts/ui-element.js#L822-L1163
367
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/downloads.js
downloadManager_cancelActiveDownloads
function downloadManager_cancelActiveDownloads() { // Get a list of all active downloads (nsISimpleEnumerator) var downloads = this._dms.activeDownloads; // Iterate through each active download and cancel it while (downloads.hasMoreElements()) { var download = downloads.getNext().QueryInterfa...
javascript
function downloadManager_cancelActiveDownloads() { // Get a list of all active downloads (nsISimpleEnumerator) var downloads = this._dms.activeDownloads; // Iterate through each active download and cancel it while (downloads.hasMoreElements()) { var download = downloads.getNext().QueryInterfa...
[ "function", "downloadManager_cancelActiveDownloads", "(", ")", "{", "// Get a list of all active downloads (nsISimpleEnumerator)", "var", "downloads", "=", "this", ".", "_dms", ".", "activeDownloads", ";", "// Iterate through each active download and cancel it", "while", "(", "do...
Cancel all active downloads
[ "Cancel", "all", "active", "downloads" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/downloads.js#L106-L115
368
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/downloads.js
downloadManager_cleanAll
function downloadManager_cleanAll(downloads) { // Cancel any active downloads this.cancelActiveDownloads(); // If no downloads have been specified retrieve the list from the database if (downloads === undefined || downloads.length == 0) downloads = this.getAllDownloads(); else downloads...
javascript
function downloadManager_cleanAll(downloads) { // Cancel any active downloads this.cancelActiveDownloads(); // If no downloads have been specified retrieve the list from the database if (downloads === undefined || downloads.length == 0) downloads = this.getAllDownloads(); else downloads...
[ "function", "downloadManager_cleanAll", "(", "downloads", ")", "{", "// Cancel any active downloads", "this", ".", "cancelActiveDownloads", "(", ")", ";", "// If no downloads have been specified retrieve the list from the database", "if", "(", "downloads", "===", "undefined", "...
Cancel any active downloads, remove the files, and clean up the Download Manager database @param {Array of download} downloads Downloaded files which should be deleted (optional)
[ "Cancel", "any", "active", "downloads", "remove", "the", "files", "and", "clean", "up", "the", "Download", "Manager", "database" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/downloads.js#L132-L147
369
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/downloads.js
downloadManager_close
function downloadManager_close(force) { var windowCount = mozmill.utils.getWindows().length; if (this._controller) { // Check if we should force the closing of the DM window if (force) { this._controller.window.close(); } else { var cmdKey = utils.getEntity(this.getDtds(), "cm...
javascript
function downloadManager_close(force) { var windowCount = mozmill.utils.getWindows().length; if (this._controller) { // Check if we should force the closing of the DM window if (force) { this._controller.window.close(); } else { var cmdKey = utils.getEntity(this.getDtds(), "cm...
[ "function", "downloadManager_close", "(", "force", ")", "{", "var", "windowCount", "=", "mozmill", ".", "utils", ".", "getWindows", "(", ")", ".", "length", ";", "if", "(", "this", ".", "_controller", ")", "{", "// Check if we should force the closing of the DM wi...
Close the download manager @param {boolean} force Force the closing of the DM window
[ "Close", "the", "download", "manager" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/downloads.js#L155-L171
370
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/downloads.js
downloadManager_deleteDownloadedFiles
function downloadManager_deleteDownloadedFiles(downloads) { downloads.forEach(function(download) { try { var file = getLocalFileFromNativePathOrUrl(download.target); file.remove(false); } catch (ex) { } }); }
javascript
function downloadManager_deleteDownloadedFiles(downloads) { downloads.forEach(function(download) { try { var file = getLocalFileFromNativePathOrUrl(download.target); file.remove(false); } catch (ex) { } }); }
[ "function", "downloadManager_deleteDownloadedFiles", "(", "downloads", ")", "{", "downloads", ".", "forEach", "(", "function", "(", "download", ")", "{", "try", "{", "var", "file", "=", "getLocalFileFromNativePathOrUrl", "(", "download", ".", "target", ")", ";", ...
Delete all downloads from the local drive @param {download} downloads List of downloaded files
[ "Delete", "all", "downloads", "from", "the", "local", "drive" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/downloads.js#L179-L187
371
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/downloads.js
downloadManager_getAllDownloads
function downloadManager_getAllDownloads() { var dbConn = this._dms.DBConnection; var stmt = null; if (dbConn.schemaVersion < 3) return new Array(); // Run a SQL query and iterate through all results which have been found var downloads = []; stmt = dbConn.createStatement("SELECT * FROM m...
javascript
function downloadManager_getAllDownloads() { var dbConn = this._dms.DBConnection; var stmt = null; if (dbConn.schemaVersion < 3) return new Array(); // Run a SQL query and iterate through all results which have been found var downloads = []; stmt = dbConn.createStatement("SELECT * FROM m...
[ "function", "downloadManager_getAllDownloads", "(", ")", "{", "var", "dbConn", "=", "this", ".", "_dms", ".", "DBConnection", ";", "var", "stmt", "=", "null", ";", "if", "(", "dbConn", ".", "schemaVersion", "<", "3", ")", "return", "new", "Array", "(", "...
Get the list of all downloaded files in the database @returns List of downloads @type {Array of download}
[ "Get", "the", "list", "of", "all", "downloaded", "files", "in", "the", "database" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/downloads.js#L195-L220
372
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/downloads.js
downloadManager_open
function downloadManager_open(controller, shortcut) { if (shortcut) { if (mozmill.isLinux) { var cmdKey = utils.getEntity(this.getDtds(), "downloadsUnix.commandkey"); controller.keypress(null, cmdKey, {ctrlKey: true, shiftKey: true}); } else { var cmdKey = utils.getEntity(this.ge...
javascript
function downloadManager_open(controller, shortcut) { if (shortcut) { if (mozmill.isLinux) { var cmdKey = utils.getEntity(this.getDtds(), "downloadsUnix.commandkey"); controller.keypress(null, cmdKey, {ctrlKey: true, shiftKey: true}); } else { var cmdKey = utils.getEntity(this.ge...
[ "function", "downloadManager_open", "(", "controller", ",", "shortcut", ")", "{", "if", "(", "shortcut", ")", "{", "if", "(", "mozmill", ".", "isLinux", ")", "{", "var", "cmdKey", "=", "utils", ".", "getEntity", "(", "this", ".", "getDtds", "(", ")", "...
Open the Download Manager @param {MozMillController} controller MozMillController of the window to operate on @param {boolean} shortcut If true the keyboard shortcut is used
[ "Open", "the", "Download", "Manager" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/downloads.js#L302-L317
373
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/downloads.js
downloadManager_waitForDownloadState
function downloadManager_waitForDownloadState(download, state, timeout) { this._controller.waitForEval("subject.manager.getDownloadState(subject.download) == subject.state", timeout, 100, {manager: this, download: download, state: state}); }
javascript
function downloadManager_waitForDownloadState(download, state, timeout) { this._controller.waitForEval("subject.manager.getDownloadState(subject.download) == subject.state", timeout, 100, {manager: this, download: download, state: state}); }
[ "function", "downloadManager_waitForDownloadState", "(", "download", ",", "state", ",", "timeout", ")", "{", "this", ".", "_controller", ".", "waitForEval", "(", "\"subject.manager.getDownloadState(subject.download) == subject.state\"", ",", "timeout", ",", "100", ",", "{...
Wait for the given download state @param {MozMillController} controller MozMillController of the window to operate on @param {downloadState} state Expected state of the download @param {number} timeout Timeout for waiting for the download state (optional)
[ "Wait", "for", "the", "given", "download", "state" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/downloads.js#L329-L332
374
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/downloads.js
function(controller, url) { controller.open(url); // Wait until the unknown content type dialog has been opened controller.waitForEval("subject.getMostRecentWindow('').document.documentElement.id == 'unknownContentType'", gTimeout, 100, mozmill.wm); utils.handleWindow("type", "", func...
javascript
function(controller, url) { controller.open(url); // Wait until the unknown content type dialog has been opened controller.waitForEval("subject.getMostRecentWindow('').document.documentElement.id == 'unknownContentType'", gTimeout, 100, mozmill.wm); utils.handleWindow("type", "", func...
[ "function", "(", "controller", ",", "url", ")", "{", "controller", ".", "open", "(", "url", ")", ";", "// Wait until the unknown content type dialog has been opened", "controller", ".", "waitForEval", "(", "\"subject.getMostRecentWindow('').document.documentElement.id == 'unkno...
Download the file of unkown type from the given location by saving it automatically to disk @param {MozMillController} controller MozMillController of the browser window @param {string} url URL of the file which has to be downloaded
[ "Download", "the", "file", "of", "unkown", "type", "from", "the", "given", "location", "by", "saving", "it", "automatically", "to", "disk" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/downloads.js#L355-L377
375
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/downloads.js
getLocalFileFromNativePathOrUrl
function getLocalFileFromNativePathOrUrl(aPathOrUrl) { if (aPathOrUrl.substring(0,7) == "file://") { // if this is a URL, get the file from that let ioSvc = Cc["@mozilla.org/network/io-service;1"] .getService(Ci.nsIIOService); // XXX it's possible that using a null char-set here is bad...
javascript
function getLocalFileFromNativePathOrUrl(aPathOrUrl) { if (aPathOrUrl.substring(0,7) == "file://") { // if this is a URL, get the file from that let ioSvc = Cc["@mozilla.org/network/io-service;1"] .getService(Ci.nsIIOService); // XXX it's possible that using a null char-set here is bad...
[ "function", "getLocalFileFromNativePathOrUrl", "(", "aPathOrUrl", ")", "{", "if", "(", "aPathOrUrl", ".", "substring", "(", "0", ",", "7", ")", "==", "\"file://\"", ")", "{", "// if this is a URL, get the file from that", "let", "ioSvc", "=", "Cc", "[", "\"@mozill...
Get a local file from a native path or URL @param {string} aPathOrUrl Native path or URL of the file @see http://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/downloads/content/downloads.js#1309
[ "Get", "a", "local", "file", "from", "a", "native", "path", "or", "URL" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/downloads.js#L386-L401
376
SeleniumHQ/selenium
javascript/jsunit/app/jsUnitCore.js
jsUnitFixTop
function jsUnitFixTop() { var tempTop = top; if (!tempTop) { tempTop = window; while (tempTop.parent) { tempTop = tempTop.parent; if (tempTop.top && tempTop.top.jsUnitTestSuite) { tempTop = tempTop.top; break; } } } ...
javascript
function jsUnitFixTop() { var tempTop = top; if (!tempTop) { tempTop = window; while (tempTop.parent) { tempTop = tempTop.parent; if (tempTop.top && tempTop.top.jsUnitTestSuite) { tempTop = tempTop.top; break; } } } ...
[ "function", "jsUnitFixTop", "(", ")", "{", "var", "tempTop", "=", "top", ";", "if", "(", "!", "tempTop", ")", "{", "tempTop", "=", "window", ";", "while", "(", "tempTop", ".", "parent", ")", "{", "tempTop", "=", "tempTop", ".", "parent", ";", "if", ...
hack for NS62 bug
[ "hack", "for", "NS62", "bug" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/jsunit/app/jsUnitCore.js#L6-L22
377
SeleniumHQ/selenium
javascript/node/optparse.js
formatHelpMsg
function formatHelpMsg(usage, options) { var prog = path.basename( process.argv[0]) + ' ' + path.basename(process.argv[1]); var help = [ usage.replace(/\$0\b/g, prog), '', 'Options:', formatOption('help', 'Show this message and exit') ]; Object.keys(options).sort().forEach(function(key) {...
javascript
function formatHelpMsg(usage, options) { var prog = path.basename( process.argv[0]) + ' ' + path.basename(process.argv[1]); var help = [ usage.replace(/\$0\b/g, prog), '', 'Options:', formatOption('help', 'Show this message and exit') ]; Object.keys(options).sort().forEach(function(key) {...
[ "function", "formatHelpMsg", "(", "usage", ",", "options", ")", "{", "var", "prog", "=", "path", ".", "basename", "(", "process", ".", "argv", "[", "0", "]", ")", "+", "' '", "+", "path", ".", "basename", "(", "process", ".", "argv", "[", "1", "]",...
Formats a help message for the given parser. @param {string} usage The usage string. All occurences of "$0" will be replaced with the name of the current program. @param {!Object.<!Option>} options The options to format. @return {string} The formatted help message.
[ "Formats", "a", "help", "message", "for", "the", "given", "parser", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/node/optparse.js#L123-L140
378
SeleniumHQ/selenium
javascript/node/optparse.js
formatOption
function formatOption(name, helpMsg) { var result = []; var options = IDENTATION + '--' + name; if (options.length > MAX_HELP_POSITION) { result.push(options); result.push('\n'); result.push(wrapStr(helpMsg, TOTAL_WIDTH, repeatStr(' ', HELP_TEXT_POSITION)).join('\n')); } else { var spac...
javascript
function formatOption(name, helpMsg) { var result = []; var options = IDENTATION + '--' + name; if (options.length > MAX_HELP_POSITION) { result.push(options); result.push('\n'); result.push(wrapStr(helpMsg, TOTAL_WIDTH, repeatStr(' ', HELP_TEXT_POSITION)).join('\n')); } else { var spac...
[ "function", "formatOption", "(", "name", ",", "helpMsg", ")", "{", "var", "result", "=", "[", "]", ";", "var", "options", "=", "IDENTATION", "+", "'--'", "+", "name", ";", "if", "(", "options", ".", "length", ">", "MAX_HELP_POSITION", ")", "{", "result...
Formats the help message for a single option. Will place the option string and help text on the same line whenever possible. @param {string} name The name of the option. @param {string} helpMsg The option's help message. @return {string} The formatted option.
[ "Formats", "the", "help", "message", "for", "a", "single", "option", ".", "Will", "place", "the", "option", "string", "and", "help", "text", "on", "the", "same", "line", "whenever", "possible", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/node/optparse.js#L150-L172
379
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/localization.js
checkAccessKeysResults
function checkAccessKeysResults(controller, accessKeysSet) { // Sort the access keys to have them in a A->Z order var accessKeysList = accessKeysSet.sort(); // List of access keys var aKeysList = []; // List of values to identify the access keys var valueList = []; // List of rectangles of nodes contai...
javascript
function checkAccessKeysResults(controller, accessKeysSet) { // Sort the access keys to have them in a A->Z order var accessKeysList = accessKeysSet.sort(); // List of access keys var aKeysList = []; // List of values to identify the access keys var valueList = []; // List of rectangles of nodes contai...
[ "function", "checkAccessKeysResults", "(", "controller", ",", "accessKeysSet", ")", "{", "// Sort the access keys to have them in a A->Z order", "var", "accessKeysList", "=", "accessKeysSet", ".", "sort", "(", ")", ";", "// List of access keys", "var", "aKeysList", "=", "...
Callback function for parsing the results of testing for duplicated access keys. This function processes the access keys found in one access keys scope looking for access keys that are listed more than one time. At the end, it calls the screenshot.create to create a screenshot with the elements containing the broken a...
[ "Callback", "function", "for", "parsing", "the", "results", "of", "testing", "for", "duplicated", "access", "keys", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/localization.js#L57-L118
380
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/localization.js
checkDimensions
function checkDimensions(child) { if (!child.boxObject) return []; var childBox = child.boxObject; var parent = childBox.parentBox; // toplevel element or hidden elements, like script tags if (!parent || parent == child.element || !parent.boxObject) { return []; } var parentBox = parent.boxObject...
javascript
function checkDimensions(child) { if (!child.boxObject) return []; var childBox = child.boxObject; var parent = childBox.parentBox; // toplevel element or hidden elements, like script tags if (!parent || parent == child.element || !parent.boxObject) { return []; } var parentBox = parent.boxObject...
[ "function", "checkDimensions", "(", "child", ")", "{", "if", "(", "!", "child", ".", "boxObject", ")", "return", "[", "]", ";", "var", "childBox", "=", "child", ".", "boxObject", ";", "var", "parent", "=", "childBox", ".", "parentBox", ";", "// toplevel ...
Callback function for testing for cropped elements. Checks if the XUL boxObject has screen coordinates outside of the screen coordinates of its parent. If there's no parent, return. @param {node} child @returns List of boxes that can be highlighted on a screenshot @type {array of array of int}
[ "Callback", "function", "for", "testing", "for", "cropped", "elements", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/localization.js#L130-L181
381
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/localization.js
filterAccessKeys
function filterAccessKeys(node) { // Menus will need a separate filter set var notAllowedLocalNames = ["menu", "menubar", "menupopup", "popupset"]; if (!node.disabled && !node.collapsed && !node.hidden && notAllowedLocalNames.indexOf(node.localName) == -1) { // Code specific to the preferences panes to...
javascript
function filterAccessKeys(node) { // Menus will need a separate filter set var notAllowedLocalNames = ["menu", "menubar", "menupopup", "popupset"]; if (!node.disabled && !node.collapsed && !node.hidden && notAllowedLocalNames.indexOf(node.localName) == -1) { // Code specific to the preferences panes to...
[ "function", "filterAccessKeys", "(", "node", ")", "{", "// Menus will need a separate filter set", "var", "notAllowedLocalNames", "=", "[", "\"menu\"", ",", "\"menubar\"", ",", "\"menupopup\"", ",", "\"popupset\"", "]", ";", "if", "(", "!", "node", ".", "disabled", ...
Filters out nodes which should not be tested because they are not in the current access key scope. @param {node} node @returns Filter status of the given node @type {array of array of int}
[ "Filters", "out", "nodes", "which", "should", "not", "be", "tested", "because", "they", "are", "not", "in", "the", "current", "access", "key", "scope", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/localization.js#L191-L215
382
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/localization.js
filterCroppedNodes
function filterCroppedNodes(node) { if (!node.boxObject) { return domUtils.DOMWalker.FILTER_SKIP; } else { if (!node.disabled && !node.collapsed && !node.hidden) { // Code specific to the preferences panes to reject out not visible nodes // in the panes. if (node.parentNode && (node.parent...
javascript
function filterCroppedNodes(node) { if (!node.boxObject) { return domUtils.DOMWalker.FILTER_SKIP; } else { if (!node.disabled && !node.collapsed && !node.hidden) { // Code specific to the preferences panes to reject out not visible nodes // in the panes. if (node.parentNode && (node.parent...
[ "function", "filterCroppedNodes", "(", "node", ")", "{", "if", "(", "!", "node", ".", "boxObject", ")", "{", "return", "domUtils", ".", "DOMWalker", ".", "FILTER_SKIP", ";", "}", "else", "{", "if", "(", "!", "node", ".", "disabled", "&&", "!", "node", ...
Filters out nodes which should not be tested because they are not visible @param {node} node @returns Filter status of the given node @type {array of array of int}
[ "Filters", "out", "nodes", "which", "should", "not", "be", "tested", "because", "they", "are", "not", "visible" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/localization.js#L224-L246
383
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/localization.js
processDimensionsResults
function processDimensionsResults(controller, boxes) { if (boxes && boxes.length > 0) { screenshot.create(controller, boxes); } }
javascript
function processDimensionsResults(controller, boxes) { if (boxes && boxes.length > 0) { screenshot.create(controller, boxes); } }
[ "function", "processDimensionsResults", "(", "controller", ",", "boxes", ")", "{", "if", "(", "boxes", "&&", "boxes", ".", "length", ">", "0", ")", "{", "screenshot", ".", "create", "(", "controller", ",", "boxes", ")", ";", "}", "}" ]
Callback function for parsing the results of testing for cropped elements. This function calls the screenshot.create method if there is at least one box. @param {array of array of int} boxes @param {MozmillController} controller
[ "Callback", "function", "for", "parsing", "the", "results", "of", "testing", "for", "cropped", "elements", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/localization.js#L270-L274
384
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/localization.js
_reportNode
function _reportNode(node) { if (node.id) { return "id: " + node.id; } else if (node.label) { return "label: " + node.label; } else if (node.value) { return "value: " + node.value; } else if (node.hasAttributes()) { var attrs = "node attributes: "; for (var i = node.attributes.length - 1; i ...
javascript
function _reportNode(node) { if (node.id) { return "id: " + node.id; } else if (node.label) { return "label: " + node.label; } else if (node.value) { return "value: " + node.value; } else if (node.hasAttributes()) { var attrs = "node attributes: "; for (var i = node.attributes.length - 1; i ...
[ "function", "_reportNode", "(", "node", ")", "{", "if", "(", "node", ".", "id", ")", "{", "return", "\"id: \"", "+", "node", ".", "id", ";", "}", "else", "if", "(", "node", ".", "label", ")", "{", "return", "\"label: \"", "+", "node", ".", "label",...
Tries to return a useful string identificator of the given node @param {node} node @returns Identificator of the node @type {String}
[ "Tries", "to", "return", "a", "useful", "string", "identificator", "of", "the", "given", "node" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/localization.js#L283-L299
385
SeleniumHQ/selenium
javascript/selenium-core/xpath/util.js
mapExec
function mapExec(array, func) { for (var i = 0; i < array.length; ++i) { func.call(this, array[i], i); } }
javascript
function mapExec(array, func) { for (var i = 0; i < array.length; ++i) { func.call(this, array[i], i); } }
[ "function", "mapExec", "(", "array", ",", "func", ")", "{", "for", "(", "var", "i", "=", "0", ";", "i", "<", "array", ".", "length", ";", "++", "i", ")", "{", "func", ".", "call", "(", "this", ",", "array", "[", "i", "]", ",", "i", ")", ";"...
Applies the given function to each element of the array, preserving this, and passing the index.
[ "Applies", "the", "given", "function", "to", "each", "element", "of", "the", "array", "preserving", "this", "and", "passing", "the", "index", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/xpath/util.js#L180-L184
386
SeleniumHQ/selenium
javascript/selenium-core/xpath/util.js
mapExpr
function mapExpr(array, func) { var ret = []; for (var i = 0; i < array.length; ++i) { ret.push(func(array[i])); } return ret; }
javascript
function mapExpr(array, func) { var ret = []; for (var i = 0; i < array.length; ++i) { ret.push(func(array[i])); } return ret; }
[ "function", "mapExpr", "(", "array", ",", "func", ")", "{", "var", "ret", "=", "[", "]", ";", "for", "(", "var", "i", "=", "0", ";", "i", "<", "array", ".", "length", ";", "++", "i", ")", "{", "ret", ".", "push", "(", "func", "(", "array", ...
Returns an array that contains the return value of the given function applied to every element of the input array.
[ "Returns", "an", "array", "that", "contains", "the", "return", "value", "of", "the", "given", "function", "applied", "to", "every", "element", "of", "the", "input", "array", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/xpath/util.js#L188-L194
387
SeleniumHQ/selenium
javascript/selenium-core/xpath/util.js
reverseInplace
function reverseInplace(array) { for (var i = 0; i < array.length / 2; ++i) { var h = array[i]; var ii = array.length - i - 1; array[i] = array[ii]; array[ii] = h; } }
javascript
function reverseInplace(array) { for (var i = 0; i < array.length / 2; ++i) { var h = array[i]; var ii = array.length - i - 1; array[i] = array[ii]; array[ii] = h; } }
[ "function", "reverseInplace", "(", "array", ")", "{", "for", "(", "var", "i", "=", "0", ";", "i", "<", "array", ".", "length", "/", "2", ";", "++", "i", ")", "{", "var", "h", "=", "array", "[", "i", "]", ";", "var", "ii", "=", "array", ".", ...
Reverses the given array in place.
[ "Reverses", "the", "given", "array", "in", "place", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/xpath/util.js#L197-L204
388
SeleniumHQ/selenium
javascript/selenium-core/xpath/util.js
copyArray
function copyArray(dst, src) { if (!src) return; var dstLength = dst.length; for (var i = src.length - 1; i >= 0; --i) { dst[i+dstLength] = src[i]; } }
javascript
function copyArray(dst, src) { if (!src) return; var dstLength = dst.length; for (var i = src.length - 1; i >= 0; --i) { dst[i+dstLength] = src[i]; } }
[ "function", "copyArray", "(", "dst", ",", "src", ")", "{", "if", "(", "!", "src", ")", "return", ";", "var", "dstLength", "=", "dst", ".", "length", ";", "for", "(", "var", "i", "=", "src", ".", "length", "-", "1", ";", "i", ">=", "0", ";", "...
Shallow-copies an array to the end of another array Basically Array.concat, but works with other non-array collections
[ "Shallow", "-", "copies", "an", "array", "to", "the", "end", "of", "another", "array", "Basically", "Array", ".", "concat", "but", "works", "with", "other", "non", "-", "array", "collections" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/xpath/util.js#L221-L227
389
SeleniumHQ/selenium
javascript/selenium-core/xpath/util.js
copyArrayIgnoringAttributesWithoutValue
function copyArrayIgnoringAttributesWithoutValue(dst, src) { if (!src) return; for (var i = src.length - 1; i >= 0; --i) { // this test will pass so long as the attribute has a non-empty string // value, even if that value is "false", "0", "undefined", etc. if (src[i].nodeValue) { dst.push(src[i])...
javascript
function copyArrayIgnoringAttributesWithoutValue(dst, src) { if (!src) return; for (var i = src.length - 1; i >= 0; --i) { // this test will pass so long as the attribute has a non-empty string // value, even if that value is "false", "0", "undefined", etc. if (src[i].nodeValue) { dst.push(src[i])...
[ "function", "copyArrayIgnoringAttributesWithoutValue", "(", "dst", ",", "src", ")", "{", "if", "(", "!", "src", ")", "return", ";", "for", "(", "var", "i", "=", "src", ".", "length", "-", "1", ";", "i", ">=", "0", ";", "--", "i", ")", "{", "// this...
This is an optimization for copying attribute lists in IE. IE includes many extraneous properties in its DOM attribute lists, which take require significant extra processing when evaluating attribute steps. With this function, we ignore any such attributes that has an empty string value.
[ "This", "is", "an", "optimization", "for", "copying", "attribute", "lists", "in", "IE", ".", "IE", "includes", "many", "extraneous", "properties", "in", "its", "DOM", "attribute", "lists", "which", "take", "require", "significant", "extra", "processing", "when",...
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/xpath/util.js#L235-L245
390
SeleniumHQ/selenium
javascript/selenium-core/xpath/util.js
xmlValue
function xmlValue(node, disallowBrowserSpecificOptimization) { if (!node) { return ''; } var ret = ''; if (node.nodeType == DOM_TEXT_NODE || node.nodeType == DOM_CDATA_SECTION_NODE) { ret += node.nodeValue; } else if (node.nodeType == DOM_ATTRIBUTE_NODE) { if (ajaxsltIsIE6) { ret += ...
javascript
function xmlValue(node, disallowBrowserSpecificOptimization) { if (!node) { return ''; } var ret = ''; if (node.nodeType == DOM_TEXT_NODE || node.nodeType == DOM_CDATA_SECTION_NODE) { ret += node.nodeValue; } else if (node.nodeType == DOM_ATTRIBUTE_NODE) { if (ajaxsltIsIE6) { ret += ...
[ "function", "xmlValue", "(", "node", ",", "disallowBrowserSpecificOptimization", ")", "{", "if", "(", "!", "node", ")", "{", "return", "''", ";", "}", "var", "ret", "=", "''", ";", "if", "(", "node", ".", "nodeType", "==", "DOM_TEXT_NODE", "||", "node", ...
Returns the text value of a node; for nodes without children this is the nodeValue, for nodes with children this is the concatenation of the value of all children. Browser-specific optimizations are used by default; they can be disabled by passing "true" in as the second parameter.
[ "Returns", "the", "text", "value", "of", "a", "node", ";", "for", "nodes", "without", "children", "this", "is", "the", "nodeValue", "for", "nodes", "with", "children", "this", "is", "the", "concatenation", "of", "the", "value", "of", "all", "children", "."...
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/xpath/util.js#L251-L289
391
SeleniumHQ/selenium
javascript/selenium-core/xpath/util.js
xmlText
function xmlText(node, opt_cdata) { var buf = []; xmlTextR(node, buf, opt_cdata); return buf.join(''); }
javascript
function xmlText(node, opt_cdata) { var buf = []; xmlTextR(node, buf, opt_cdata); return buf.join(''); }
[ "function", "xmlText", "(", "node", ",", "opt_cdata", ")", "{", "var", "buf", "=", "[", "]", ";", "xmlTextR", "(", "node", ",", "buf", ",", "opt_cdata", ")", ";", "return", "buf", ".", "join", "(", "''", ")", ";", "}" ]
Returns the representation of a node as XML text.
[ "Returns", "the", "representation", "of", "a", "node", "as", "XML", "text", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/xpath/util.js#L302-L306
392
SeleniumHQ/selenium
javascript/selenium-core/xpath/util.js
predicateExprHasPositionalSelector
function predicateExprHasPositionalSelector(expr, isRecursiveCall) { if (!expr) { return false; } if (!isRecursiveCall && exprReturnsNumberValue(expr)) { // this is a "proximity position"-based predicate return true; } if (expr instanceof FunctionCallExpr) { var value = expr.name.value; re...
javascript
function predicateExprHasPositionalSelector(expr, isRecursiveCall) { if (!expr) { return false; } if (!isRecursiveCall && exprReturnsNumberValue(expr)) { // this is a "proximity position"-based predicate return true; } if (expr instanceof FunctionCallExpr) { var value = expr.name.value; re...
[ "function", "predicateExprHasPositionalSelector", "(", "expr", ",", "isRecursiveCall", ")", "{", "if", "(", "!", "expr", ")", "{", "return", "false", ";", "}", "if", "(", "!", "isRecursiveCall", "&&", "exprReturnsNumberValue", "(", "expr", ")", ")", "{", "//...
Determines whether a predicate expression contains a "positional selector". A positional selector filters nodes from the nodelist input based on their position within that list. When such selectors are encountered, the evaluation of the predicate cannot be depth-first, because the positional selector may be based on th...
[ "Determines", "whether", "a", "predicate", "expression", "contains", "a", "positional", "selector", ".", "A", "positional", "selector", "filters", "nodes", "from", "the", "nodelist", "input", "based", "on", "their", "position", "within", "that", "list", ".", "Wh...
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/xpath/util.js#L495-L513
393
SeleniumHQ/selenium
third_party/closure/goog/labs/useragent/browser.js
lookUpValueWithKeys
function lookUpValueWithKeys(keys) { var key = goog.array.find(keys, versionMapHasKey); return versionMap[key] || ''; }
javascript
function lookUpValueWithKeys(keys) { var key = goog.array.find(keys, versionMapHasKey); return versionMap[key] || ''; }
[ "function", "lookUpValueWithKeys", "(", "keys", ")", "{", "var", "key", "=", "goog", ".", "array", ".", "find", "(", "keys", ",", "versionMapHasKey", ")", ";", "return", "versionMap", "[", "key", "]", "||", "''", ";", "}" ]
Gives the value with the first key it finds, otherwise empty string.
[ "Gives", "the", "value", "with", "the", "first", "key", "it", "finds", "otherwise", "empty", "string", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/closure/goog/labs/useragent/browser.js#L244-L247
394
SeleniumHQ/selenium
javascript/node/selenium-webdriver/chrome.js
createExecutor
function createExecutor(url) { let agent = new http.Agent({ keepAlive: true }); let client = url.then(url => new http.HttpClient(url, agent)); let executor = new http.Executor(client); configureExecutor(executor); return executor; }
javascript
function createExecutor(url) { let agent = new http.Agent({ keepAlive: true }); let client = url.then(url => new http.HttpClient(url, agent)); let executor = new http.Executor(client); configureExecutor(executor); return executor; }
[ "function", "createExecutor", "(", "url", ")", "{", "let", "agent", "=", "new", "http", ".", "Agent", "(", "{", "keepAlive", ":", "true", "}", ")", ";", "let", "client", "=", "url", ".", "then", "(", "url", "=>", "new", "http", ".", "HttpClient", "...
Creates a command executor with support for ChromeDriver's custom commands. @param {!Promise<string>} url The server's URL. @return {!command.Executor} The new command executor.
[ "Creates", "a", "command", "executor", "with", "support", "for", "ChromeDriver", "s", "custom", "commands", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/node/selenium-webdriver/chrome.js#L172-L178
395
SeleniumHQ/selenium
javascript/node/selenium-webdriver/chrome.js
configureExecutor
function configureExecutor(executor) { executor.defineCommand( Command.LAUNCH_APP, 'POST', '/session/:sessionId/chromium/launch_app'); executor.defineCommand( Command.GET_NETWORK_CONDITIONS, 'GET', '/session/:sessionId/chromium/network_conditions'); executor.defineCommand( ...
javascript
function configureExecutor(executor) { executor.defineCommand( Command.LAUNCH_APP, 'POST', '/session/:sessionId/chromium/launch_app'); executor.defineCommand( Command.GET_NETWORK_CONDITIONS, 'GET', '/session/:sessionId/chromium/network_conditions'); executor.defineCommand( ...
[ "function", "configureExecutor", "(", "executor", ")", "{", "executor", ".", "defineCommand", "(", "Command", ".", "LAUNCH_APP", ",", "'POST'", ",", "'/session/:sessionId/chromium/launch_app'", ")", ";", "executor", ".", "defineCommand", "(", "Command", ".", "GET_NE...
Configures the given executor with Chrome-specific commands. @param {!http.Executor} executor the executor to configure.
[ "Configures", "the", "given", "executor", "with", "Chrome", "-", "specific", "commands", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/node/selenium-webdriver/chrome.js#L185-L202
396
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/addons.js
addonsManager_open
function addonsManager_open(aSpec) { var spec = aSpec || { }; var type = (spec.type == undefined) ? "menu" : spec.type; var waitFor = (spec.waitFor == undefined) ? true : spec.waitFor; switch (type) { case "menu": var menuItem = new elementslib.Elem(this._controller. ...
javascript
function addonsManager_open(aSpec) { var spec = aSpec || { }; var type = (spec.type == undefined) ? "menu" : spec.type; var waitFor = (spec.waitFor == undefined) ? true : spec.waitFor; switch (type) { case "menu": var menuItem = new elementslib.Elem(this._controller. ...
[ "function", "addonsManager_open", "(", "aSpec", ")", "{", "var", "spec", "=", "aSpec", "||", "{", "}", ";", "var", "type", "=", "(", "spec", ".", "type", "==", "undefined", ")", "?", "\"menu\"", ":", "spec", ".", "type", ";", "var", "waitFor", "=", ...
Open the Add-ons Manager @param {object} aSpec Information how to open the Add-ons Manager Elements: type - Event, can be menu, or shortcut [optional - default: menu] waitFor - Wait until the Add-ons Manager has been opened [optional - default: true] @returns Reference the tab with the Add-ons Manager open @type ...
[ "Open", "the", "Add", "-", "ons", "Manager" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/addons.js#L131-L152
397
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/addons.js
addonsManager_waitforOpened
function addonsManager_waitforOpened(aSpec) { var spec = aSpec || { }; var timeout = (spec.timeout == undefined) ? TIMEOUT : spec.timeout; // TODO: restore after 1.5.1 has landed // var self = this; // // mozmill.utils.waitFor(function() { // return self.isOpen; // }, timeout, 100, "A...
javascript
function addonsManager_waitforOpened(aSpec) { var spec = aSpec || { }; var timeout = (spec.timeout == undefined) ? TIMEOUT : spec.timeout; // TODO: restore after 1.5.1 has landed // var self = this; // // mozmill.utils.waitFor(function() { // return self.isOpen; // }, timeout, 100, "A...
[ "function", "addonsManager_waitforOpened", "(", "aSpec", ")", "{", "var", "spec", "=", "aSpec", "||", "{", "}", ";", "var", "timeout", "=", "(", "spec", ".", "timeout", "==", "undefined", ")", "?", "TIMEOUT", ":", "spec", ".", "timeout", ";", "// TODO: r...
Waits until the Addons Manager has been opened and returns its controller @param {object} aSpec Object with parameters for customization Elements: timeout - Duration to wait for the target state [optional - default: 5s] @returns Currently selected tab
[ "Waits", "until", "the", "Addons", "Manager", "has", "been", "opened", "and", "returns", "its", "controller" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/addons.js#L174-L192
398
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/addons.js
addonsManager_handleUtilsButton
function addonsManager_handleUtilsButton(aSpec) { var spec = aSpec || { }; var item = spec.item; if (!item) throw new Error(arguments.callee.name + ": Menu item not specified."); var button = this.getElement({type: "utilsButton"}); var menu = this.getElement({type: "utilsButton_menu"}); ...
javascript
function addonsManager_handleUtilsButton(aSpec) { var spec = aSpec || { }; var item = spec.item; if (!item) throw new Error(arguments.callee.name + ": Menu item not specified."); var button = this.getElement({type: "utilsButton"}); var menu = this.getElement({type: "utilsButton_menu"}); ...
[ "function", "addonsManager_handleUtilsButton", "(", "aSpec", ")", "{", "var", "spec", "=", "aSpec", "||", "{", "}", ";", "var", "item", "=", "spec", ".", "item", ";", "if", "(", "!", "item", ")", "throw", "new", "Error", "(", "arguments", ".", "callee"...
Opens the utils button menu and clicks the specified menu entry @param {object} aSpec Information about the menu Elements: item - menu item to click (updateNow, viewUpdates, installFromFile, autoUpdateDefault, resetAddonUpdatesToAutomatic, resetAddonUpdatesToManual)
[ "Opens", "the", "utils", "button", "menu", "and", "clicks", "the", "specified", "menu", "entry" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/addons.js#L227-L269
399
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/addons.js
addonsManager_enableAddon
function addonsManager_enableAddon(aSpec) { var spec = aSpec || { }; spec.button = "enable"; var button = this.getAddonButton(spec); this._controller.click(button); }
javascript
function addonsManager_enableAddon(aSpec) { var spec = aSpec || { }; spec.button = "enable"; var button = this.getAddonButton(spec); this._controller.click(button); }
[ "function", "addonsManager_enableAddon", "(", "aSpec", ")", "{", "var", "spec", "=", "aSpec", "||", "{", "}", ";", "spec", ".", "button", "=", "\"enable\"", ";", "var", "button", "=", "this", ".", "getAddonButton", "(", "spec", ")", ";", "this", ".", "...
Enables the specified add-on @param {object} aSpec Information on which add-on to operate on Elements: addon - Add-on element
[ "Enables", "the", "specified", "add", "-", "on" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/addons.js#L346-L352