Search is not available for this dataset
query
stringlengths
7
355k
document
stringlengths
9
341k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Checks for an existing class in the class attributes
hasClass(clazz) { let hasIt = false; this.eachElem(node => { hasIt = node.classList.contains(clazz); if (hasIt) { return false; } }); return hasIt; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function class_exists(ele,className){return new RegExp(' '+className+' ').test(' '+ele.className+' ');}", "function hasClassAttribute( tagNode )\n{\n return( tagNode.getAttribute( strClassAttrib ) != null );\n}", "function classExists(object,clazz){\n return new RegExp('\\\\b' + clazz + '\\\\b').test(obje...
[ "0.6956762", "0.6784982", "0.6775136", "0.67321575", "0.6691885", "0.6631493", "0.66108686", "0.656237", "0.6536141", "0.64705306", "0.6449504", "0.6407576", "0.6407576", "0.6407576", "0.6407576", "0.63942397", "0.63903546", "0.63831514", "0.63614964", "0.6331424", "0.6309856...
0.0
-1
appends a class string if not already in the element(s)
addClass(clazz) { this.eachElem(item => item.classList.add(clazz)); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function myAddClass(element, name) {\n var i, arr1, arr2;\n arr1 = element.className.split(\" \");\n arr2 = name.split(\" \");\n for (i = 0; i < arr2.length; i++) {\n if (arr1.indexOf(arr2[i]) == -1) {element.className += \" \" + arr2[i];}\n }\n}", "function AddClass(ele, classStr) {\r\n //w[i].classNam...
[ "0.72567284", "0.72260755", "0.7225765", "0.7180488", "0.7166714", "0.71408504", "0.70277214", "0.7014504", "0.7014504", "0.6966097", "0.6925994", "0.6908605", "0.6894536", "0.6883611", "0.68808055", "0.68798655", "0.6867172", "0.68290436", "0.6725122", "0.67136014", "0.67103...
0.0
-1
remove the style class if in the class definitions
removeClass(clazz) { this.eachElem(item => item.classList.remove(clazz)); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function remove(){\n\t\tthis.classList.remove(\"red\");\n\t}", "function resetCss() {\n\t\tif (element) {\n\t\t\telement.className = Command.css.base + \" \" + definition.css;\n\t\t}\n\t}", "function removeRules()\n\t{\n\t\tif(style)\n\t\t\tstyle.parentNode.removeChild(style);\n\t}", "_removeInlineStyle() {\...
[ "0.6962374", "0.6793171", "0.6583231", "0.6567544", "0.6555961", "0.65302837", "0.6509978", "0.6494948", "0.64943975", "0.64928794", "0.64928794", "0.6463383", "0.64481974", "0.64451313", "0.63964844", "0.63628674", "0.63619417", "0.6338005", "0.6322216", "0.6320966", "0.6305...
0.644717
14
checks whether we have a multipart element in our children or are one
isMultipartCandidate(deep = false) { const FILE_INPUT = "input[type='file']"; return this.matchesSelector(FILE_INPUT) || ((!deep) ? this.querySelectorAll(FILE_INPUT) : this.querySelectorAllDeep(FILE_INPUT)).first().isPresent(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sjb_is_attachment( event ) {\n var error_free = true;\n $(\".sjb-attachment\").each(function () {\n\n var element = $(\"#\" + $(this).attr(\"id\"));\n var valid = element.hasClass(\"valid\");\n var is_required_class = element.hasClass(\"sj...
[ "0.5939736", "0.5726191", "0.5669857", "0.5550514", "0.5539582", "0.5503482", "0.5458185", "0.545173", "0.54416656", "0.53771055", "0.53617907", "0.5343468", "0.53102106", "0.53080887", "0.5297163", "0.52726555", "0.52657545", "0.5242516", "0.5202719", "0.51518786", "0.515187...
0.6608077
1
innerHtml equivalent to jQueries html as setter the html is set and the DomQuery is given back as getter the html string is returned
html(newInnerHTML) { if (Monad_1.Optional.fromNullable(newInnerHTML).isAbsent()) { return this.isPresent() ? Monad_1.Optional.fromNullable(this.innerHTML) : Monad_1.Optional.absent; } this.innerHTML = newInnerHTML; return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setHTML(_html) {\n ELEM.setHTML(this.elemId, _html);\n return this;\n }", "set innerHtml(newInnerHtml) {\n this.innerHTML = newInnerHtml;\n }", "set innerHtml(newInnerHtml) {\n this.innerHTML = newInnerHtml;\n }", "get innerHtml() {\n return this.innerHTML;\n }", "get i...
[ "0.71356565", "0.69969773", "0.69969773", "0.69782484", "0.69782484", "0.6976577", "0.6865699", "0.6797742", "0.67719936", "0.676149", "0.6734491", "0.6657762", "0.6657762", "0.65428287", "0.6485006", "0.6470654", "0.6448152", "0.63667226", "0.63315254", "0.6320751", "0.63207...
0.71215826
1
Standard dispatch event method, delegated from node
dispatchEvent(evt) { this.eachElem(elem => elem.dispatchEvent(evt)); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "dispatchEvent(_event) {\n throw new Error(\"This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes.\");\n }", "dispatchEvent(_event) {\n throw new Error(\"This is a stub dispatchEvent implementation that should not be used. It only exists...
[ "0.7029531", "0.7029531", "0.7029531", "0.68723756", "0.6706215", "0.6635909", "0.6593281", "0.6593281", "0.64903826", "0.63705444", "0.63574773", "0.6353504", "0.63532746", "0.63261", "0.63139653", "0.63139653", "0.63126475", "0.63100994", "0.6306153", "0.6303436", "0.628833...
0.0
-1
abbreviation property to use innerHTML directly like on the dom tree
set innerHTML(newInnerHTML) { this.eachElem(elem => elem.innerHTML = newInnerHTML); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function innerHTML() {\n return 'innerHTML';\n }", "function innerHTML() {\n return 'innerHTML';\n}", "function innerHTML() {\n return 'innerHTML';\n}", "get innerHTML() {\n return this.#el?.innerHTML ?? this.#innerHTML;\n }", "function updateTagNameDisplayer(element) {\n $(\"#tag-name\").text...
[ "0.6820068", "0.6457015", "0.6457015", "0.6083609", "0.5817787", "0.5713708", "0.568217", "0.5672377", "0.56668913", "0.56668913", "0.56626666", "0.56594837", "0.563815", "0.5637543", "0.5632034", "0.5617513", "0.56129205", "0.55806", "0.5578405", "0.5557938", "0.55146044", ...
0.5473412
26
getter abbreviation to use innerHTML directly
get innerHTML() { let retArr = []; this.eachElem(elem => retArr.push(elem.innerHTML)); return retArr.join(""); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function innerHTML() {\n return 'innerHTML';\n }", "get innerHTML() {\n return this.#el?.innerHTML ?? this.#innerHTML;\n }", "function innerHTML() {\n return 'innerHTML';\n}", "function innerHTML() {\n return 'innerHTML';\n}", "get innerHtml() {\n return this.innerHTML;\n }", "get inn...
[ "0.74270046", "0.72282404", "0.7202822", "0.7202822", "0.7122265", "0.7122265", "0.69992983", "0.69992983", "0.69283605", "0.6769245", "0.6438545", "0.6369381", "0.6368024", "0.6249626", "0.6249267", "0.6243459", "0.6099842", "0.60863876", "0.6062656", "0.60400426", "0.601997...
0.6603546
11
since the dom allows both innerHTML and innerHtml we also have to implement both
set innerHtml(newInnerHtml) { this.innerHTML = newInnerHtml; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function innerHTML() {\n return 'innerHTML';\n }", "get innerHtml() {\n return this.innerHTML;\n }", "get innerHtml() {\n return this.innerHTML;\n }", "get innerHTML() {\n return this.#el?.innerHTML ?? this.#innerHTML;\n }", "set innerHTML(html) {\n if (this.#el) this.#el.inn...
[ "0.7441723", "0.74180335", "0.74180335", "0.7329382", "0.73057914", "0.72438884", "0.71746653", "0.71746653", "0.7116584", "0.70796365", "0.70796365", "0.69711983", "0.69711983", "0.6947255", "0.68783873", "0.6875996", "0.6788529", "0.67842203", "0.6729682", "0.6711831", "0.6...
0.6983134
12
same here, getter for allowing innerHtml directly
get innerHtml() { return this.innerHTML; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get innerHTML() {\n return this.#el?.innerHTML ?? this.#innerHTML;\n }", "getHTML(_id) {\n return this._elements[_id].innerHTML;\n }", "getHTML(_id) {\n return this._elements[_id].innerHTML;\n }", "get innerHTML() {\n let retArr = [];\n this.eachElem(elem => retArr.push(elem.innerHT...
[ "0.771163", "0.70204306", "0.70204306", "0.6995949", "0.6995949", "0.6923306", "0.6922882", "0.682831", "0.6806453", "0.6721419", "0.67163175", "0.67084527", "0.66913605", "0.66714215", "0.666949", "0.6668515", "0.6591028", "0.6563374", "0.65244573", "0.6497898", "0.6497898",...
0.80132216
1
filters the current dom query elements upon a given selector
filterSelector(selector) { let matched = []; this.eachElem(item => { if (this._mozMatchesSelector(item, selector)) { matched.push(item); } }); return new DomQuery(...matched); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function queryElements(elem, selector) {\n try {\n return Array.prototype.slice.call(elem.querySelectorAll(selector), 0);\n } catch(e) {\n return [];\n }\n }", "queryAll(selector) {\n return res.concat(Array.prototype.slice.call(document.querySelectorAll(selector)...
[ "0.64675504", "0.6415207", "0.6355391", "0.63243407", "0.6300918", "0.626391", "0.626391", "0.62196934", "0.6201793", "0.62004817", "0.6182019", "0.6181065", "0.6177748", "0.614932", "0.6134337", "0.612172", "0.6111877", "0.6111877", "0.61019176", "0.61019176", "0.6101074", ...
0.79159886
1
checks whether any item in this domQuery level matches the selector if there is one element only attached, as root the match is only performed on this element.
matchesSelector(selector) { return this.asArray .some(item => this._mozMatchesSelector(item.getAsElem(0).value, selector)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "matches(selector) {\n /* find root element */\n /* eslint-disable-next-line @typescript-eslint/no-this-alias */\n let root = this;\n while (root.parent) {\n root = root.parent;\n }\n /* a bit slow implementation as it finds all candidates for the selector and\n ...
[ "0.70255333", "0.673451", "0.628511", "0.6256432", "0.62513334", "0.62513334", "0.62513334", "0.62513334", "0.62513334", "0.62513334", "0.62513334", "0.62513334", "0.62513334", "0.62513334", "0.62513334", "0.62513334", "0.62513334", "0.62513334", "0.62513334", "0.62513334", "...
0.5991176
26
easy node traversal, you can pass a set of node selectors which are joined as direct children Note!!! The root nodes are not in the getIf, those are always the child nodes
getIf(...nodeSelector) { let selectorStage = this.childNodes; for (let cnt = 0; cnt < nodeSelector.length; cnt++) { selectorStage = selectorStage.filterSelector(nodeSelector[cnt]); if (selectorStage.isAbsent()) { return selectorStage; } } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function traverse(nodes) {\n for (var i = 0, l = nodes.length; i < l; i++) {\n var node = nodes[i];\n if (node.isSelected()) {\n result.push(node);\n }\n else {\n // if not selected, then if it's a group, a...
[ "0.68329716", "0.68329716", "0.68329716", "0.68329716", "0.68329716", "0.6444033", "0.6444033", "0.6444033", "0.6198442", "0.6143858", "0.61176157", "0.60659885", "0.6060631", "0.6060631", "0.6026355", "0.597654", "0.597654", "0.597654", "0.59750235", "0.596935", "0.59376377"...
0.54748744
100
replace convenience function, replaces one or more elements with a set of elements passed as DomQuery
replace(toReplace) { this.each(item => { let asElem = item.getAsElem(0).value; let parent = asElem.parentElement; let nextElement = asElem.nextElementSibling; let previousElement = asElem.previousElementSibling; if (nextElement != null) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function replaceWithMultiple(nodes) {\n\t this.resync();\n\n\t nodes = this._verifyNodeList(nodes);\n\t t.inheritLeadingComments(nodes[0], this.node);\n\t t.inheritTrailingComments(nodes[nodes.length - 1], this.node);\n\t this.node = this.container[this.key] = null;\n\t this.insertAfter(nodes);\n\t if (!thi...
[ "0.5890234", "0.5890234", "0.587469", "0.577896", "0.5744591", "0.5744591", "0.56581455", "0.5646604", "0.562426", "0.5617348", "0.5610689", "0.5610689", "0.5593582", "0.55550796", "0.5498721", "0.54929525", "0.54929525", "0.5482341", "0.5447866", "0.5421307", "0.5294062", ...
0.58259535
4
returns a new dom query containing only the first element max
first(func = (item) => item) { if (this.rootNode.length >= 1) { func(this.get(0), 0); return this.get(0); } return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getMax() {\n return this.doc.querySelector(\".f1so0fyt\").childNodes.length-2;\n }", "extractMax() {\n if (this.values.length===1) {\n return this.values.pop()\n }\n let max = this.values[0]\n let tail = this.values.pop()\n this.values[0] = tail\n let inde...
[ "0.6572149", "0.5999975", "0.58854073", "0.58809066", "0.58621716", "0.579219", "0.57246643", "0.5698078", "0.5692826", "0.56576216", "0.56565255", "0.56394035", "0.5603331", "0.5603331", "0.55705625", "0.55599827", "0.55502415", "0.553876", "0.5535543", "0.5535543", "0.55355...
0.0
-1
returns a new dom query containing only the first element max
last(func = (item) => item) { if (this.rootNode.length >= 1) { let lastNode = this.get(this.rootNode.length - 1); func(lastNode, 0); return lastNode; } return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getMax() {\n return this.doc.querySelector(\".f1so0fyt\").childNodes.length-2;\n }", "extractMax() {\n if (this.values.length===1) {\n return this.values.pop()\n }\n let max = this.values[0]\n let tail = this.values.pop()\n this.values[0] = tail\n let inde...
[ "0.6572894", "0.60018677", "0.5888143", "0.5883054", "0.58597887", "0.5792796", "0.5727496", "0.5697086", "0.56929445", "0.56604093", "0.5657662", "0.5640373", "0.5605056", "0.5605056", "0.55719554", "0.55626553", "0.5552691", "0.55399185", "0.55346036", "0.55346036", "0.5534...
0.51489985
49
filter function which filters a subset
filter(func) { let reArr = []; this.each((item) => { func(item) ? reArr.push(item) : null; }); return new DomQuery(...reArr); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function filterFunction() {\n \n}", "function filter() {\n \n}", "function getFilteredSubSets(subSetsToFilter){if(!subSetsToFilter){subSetsToFilter=subSets;}if(!UpSetState.hideEmpties){return subSetsToFilter.slice(0);}var filteredSubSets=[];for(var i=0;i<subSetsToFilter.length;i++){if(subSetsToFilter[i]....
[ "0.6989865", "0.68343705", "0.6758984", "0.6682302", "0.6646868", "0.6646868", "0.66114753", "0.6556872", "0.64412534", "0.6330535", "0.63278645", "0.6269521", "0.6195091", "0.61922365", "0.61914235", "0.61694986", "0.61589473", "0.6124843", "0.61216605", "0.61158866", "0.608...
0.5904869
51
global eval head appendix method no other methods are supported anymore
globalEval(code, nonce) { var _a, _b, _c; const head = (_b = (_a = document.getElementsByTagName("head")) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : (_c = document.documentElement.getElementsByTagName("head")) === null || _c === void 0 ? void 0 : _c[0]; const sc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cjAddHeadScriptCode(codeAsString) {\n eval(codeAsString)\n}", "globalEval() {\n // phase one, if we have head inserts, we build up those before going into the script eval phase\n let insertHeadElems = new ExtDomQuery_1.ExtDomQuery(...this.internalContext.getIf(Const_1.DEFERRED_HEAD_INS...
[ "0.5547218", "0.5519639", "0.54056644", "0.53842527", "0.5368018", "0.5328619", "0.5316357", "0.5306262", "0.5290432", "0.52540535", "0.5223007", "0.5218102", "0.51836413", "0.51836413", "0.51434916", "0.5120278", "0.51073366", "0.51073366", "0.509418", "0.5090114", "0.507791...
0.0
-1
global eval head appendix method no other methods are supported anymore
globalEvalSticky(code, nonce) { let head = document.getElementsByTagName("head")[0] || document.documentElement; let script = document.createElement("script"); this.applyNonce(nonce, script); script.type = "text/javascript"; script.innerHTML = code; head.appendChild(scrip...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cjAddHeadScriptCode(codeAsString) {\n eval(codeAsString)\n}", "globalEval() {\n // phase one, if we have head inserts, we build up those before going into the script eval phase\n let insertHeadElems = new ExtDomQuery_1.ExtDomQuery(...this.internalContext.getIf(Const_1.DEFERRED_HEAD_INS...
[ "0.5544768", "0.5520098", "0.54050905", "0.5383313", "0.5367856", "0.5327662", "0.53157413", "0.5305017", "0.5288208", "0.5252561", "0.52229893", "0.5216395", "0.51835775", "0.51835775", "0.5141568", "0.5120061", "0.5106192", "0.5106192", "0.5092297", "0.50912225", "0.5077165...
0.45042953
88
appends the current set of elements to the element or first element passed via elem
appendTo(elem) { if (Lang_1.Lang.isString(elem)) { this.appendTo(DomQuery.querySelectorAll(elem)); return this; } this.eachElem((item) => { let value1 = elem.getAsElem(0).orElseLazy(() => { return { appendChild: () => { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "appendTo(elem) {\n if (Lang.isString(elem)) {\n this.appendTo(DomQuery.querySelectorAll(elem));\n return this;\n }\n this.eachElem((item) => {\n let value1 = elem.getAsElem(0).orElseLazy(() => {\n return {\n appendChild: () => ...
[ "0.6975339", "0.66849935", "0.6416291", "0.6355989", "0.63205683", "0.63203645", "0.6201464", "0.6186776", "0.60972685", "0.60610574", "0.60445", "0.59952056", "0.593641", "0.5919486", "0.59079486", "0.59058684", "0.59058684", "0.59058684", "0.59058684", "0.59058684", "0.5905...
0.69817704
0
loads and evaluates a script from a source uri
loadScriptEval(src, delay = 0, nonce) { this._loadScriptEval(false, src, delay, nonce); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadScript (/*string*/name, /*string*/ version, /*string*/ uri ) {\n _loadResource(name, version, RC_TYPE.SCRIPT, null, uri, true);\n }", "async eval(scriptSource) {\n const port = await this[$workerInitializes];\n const url = URL.createObjectURL(new Blob([scriptSource], { type: 't...
[ "0.7088233", "0.6816247", "0.62255585", "0.61132836", "0.6102369", "0.6023293", "0.60219187", "0.6021202", "0.5989363", "0.59832054", "0.59516877", "0.5919187", "0.5915852", "0.5882949", "0.5857117", "0.58333355", "0.5823535", "0.5753521", "0.5751924", "0.5740503", "0.5739045...
0.0
-1
loads and evaluates a script from a source uri
loadScriptEvalSticky(src, delay = 0, nonce) { this._loadScriptEval(true, src, delay, nonce); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadScript (/*string*/name, /*string*/ version, /*string*/ uri ) {\n _loadResource(name, version, RC_TYPE.SCRIPT, null, uri, true);\n }", "async eval(scriptSource) {\n const port = await this[$workerInitializes];\n const url = URL.createObjectURL(new Blob([scriptSource], { type: 't...
[ "0.7088233", "0.6816247", "0.62255585", "0.61132836", "0.6102369", "0.6023293", "0.60219187", "0.6021202", "0.5989363", "0.59832054", "0.59516877", "0.5919187", "0.5915852", "0.5882949", "0.5857117", "0.58333355", "0.5823535", "0.5753521", "0.5751924", "0.5740503", "0.5739045...
0.0
-1
find all parents in the hierarchy for which the selector matches
allParents(selector) { let parent = this.parent(); let ret = []; while (parent.isPresent()) { if (parent.matchesSelector(selector)) { ret.push(parent); } parent = parent.parent(); } return new DomQuery(...ret); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "parentsWhileMatch(selector) {\n const retArr = [];\n let parent = this.parent().filter(item => item.matchesSelector(selector));\n while (parent.isPresent()) {\n retArr.push(parent);\n parent = parent.parent().filter(item => item.matchesSelector(selector));\n }\n ...
[ "0.80688435", "0.80688435", "0.71918756", "0.6745207", "0.6678608", "0.6473464", "0.6432573", "0.64048934", "0.63159245", "0.6292252", "0.62801343", "0.62667954", "0.6251684", "0.6251684", "0.6246473", "0.6242648", "0.6191047", "0.6130698", "0.6121188", "0.6119623", "0.607821...
0.80102974
3
finds the first parent in the hierarchy for which the selector matches
firstParent(selector) { let parent = this.parent(); while (parent.isPresent()) { if (parent.matchesSelector(selector)) { return parent; } parent = parent.parent(); } return DomQuery.absent; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "findFirstParent(kindToMatch) {\n let current = this;\n while (current) {\n if (current.kind === kindToMatch) {\n return current;\n }\n current = current.parent;\n }\n return undefined;\n }", "function findParent(a,b){var c=a.$parent;i...
[ "0.76709867", "0.7670918", "0.7565391", "0.7488691", "0.7488691", "0.73484534", "0.7280234", "0.7260702", "0.7260702", "0.7260702", "0.7260702", "0.7260702", "0.7138409", "0.7057135", "0.7057135", "0.7057135", "0.7057135", "0.70510757", "0.70297897", "0.70134234", "0.69700485...
0.8390802
1
fetches all parents as long as the filter criterium matches
parentsWhileMatch(selector) { const retArr = []; let parent = this.parent().filter(item => item.matchesSelector(selector)); while (parent.isPresent()) { retArr.push(parent); parent = parent.parent().filter(item => item.matchesSelector(selector)); } return ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "allParents(selector) {\n let parent = this.parent();\n let ret = [];\n while (parent.isPresent()) {\n if (parent.matchesSelector(selector)) {\n ret.push(parent);\n }\n parent = parent.parent();\n }\n return new DomQuery(...ret);\n ...
[ "0.62873274", "0.62873274", "0.62089556", "0.616747", "0.60793436", "0.6034889", "0.57794785", "0.56542236", "0.56264013", "0.5593466", "0.55464274", "0.55443096", "0.5469218", "0.54457456", "0.54167813", "0.5404823", "0.540052", "0.5396207", "0.5392469", "0.53737897", "0.536...
0.66376877
1
outerHTML convenience method browsers only support innerHTML but for instance for your jsf.js we have a full replace pattern which needs outerHTML processing
outerHTML(markup, runEmbeddedScripts, runEmbeddedCss, deep = false) { var _a; if (this.isAbsent()) { return; } let focusElementId = (_a = document === null || document === void 0 ? void 0 : document.activeElement) === null || _a === void 0 ? void 0 : _a.id; let caretP...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getOuterHTML(el){if(el.outerHTML){return el.outerHTML;}else{var container=document.createElement('div');container.appendChild(el.cloneNode(true));return container.innerHTML;}}", "function getOuterHTML(el){if(el.outerHTML){return el.outerHTML;}else{var container=document.createElement('div');container.ap...
[ "0.7723791", "0.7723791", "0.7723791", "0.76534647", "0.7499339", "0.7458349", "0.7458349", "0.7458349", "0.7458349", "0.7458349", "0.7449123", "0.74301565", "0.74301565", "0.74208486", "0.74208486", "0.74208486", "0.7407206", "0.73897797", "0.73897797", "0.73813707", "0.7377...
0.0
-1
Run through the given nodes in the DomQuery execute the inline scripts
runScripts(sticky = false, whitelisted = DEFAULT_WHITELIST) { const evalCollectedScripts = (scriptsToProcess) => { if (scriptsToProcess.length) { // script source means we have to eval the existing // scripts before we run the 'include' command // this...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async evaluate(scripts) {\n scripts &&= [].concat(scripts);\n if (!scripts?.length) return;\n\n this.log.debug('Evaluate JavaScript', { ...this.meta, scripts });\n\n for (let script of scripts) {\n if (typeof script === 'string') {\n script = `async eval({ waitFor }) {\\n${script}\\n}`;\n ...
[ "0.5805399", "0.55781823", "0.55193657", "0.5478235", "0.5478235", "0.5478235", "0.5478235", "0.5473961", "0.5473961", "0.5473961", "0.5457091", "0.53922105", "0.53582436", "0.5185867", "0.51739794", "0.51476836", "0.5142701", "0.5128725", "0.5072997", "0.5044161", "0.5044161...
0.493632
25
fires a click event on the underlying dom elements
click() { this.fireEvent("click"); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "click() {\n this.elements.forEach(element => element.click());\n }", "function click(el){\n \n \n}", "function click(elm) {\r\n var evt = document.createEvent('MouseEvents');\r\n evt.initEvent('click', true, true);\r\n elm.dispatchEvent(evt);\r\n }", "onClick(element) {\n\...
[ "0.76927626", "0.72271943", "0.7061095", "0.70573956", "0.69987637", "0.69987637", "0.69987637", "0.69649225", "0.6926144", "0.691808", "0.6856294", "0.6851692", "0.68215185", "0.6820501", "0.6796243", "0.6779243", "0.67576444", "0.6713606", "0.6713606", "0.66827583", "0.6667...
0.6719856
18
encodes all input elements properly into respective config entries, this can be used for legacy systems, for newer usecases, use the HTML5 Form class which all newer browsers provide
encodeFormElement(toMerge = {}) { // browser behavior no element name no encoding (normal submit fails in that case) // https:// issues.apache.org/jira/browse/MYFACES-2847 if (this.name.isAbsent()) { return; } // let´s keep it side-effects free let target = (0...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fillHtmlInputs(config) {\r\n Object.keys(config).forEach(function (key, index) {\r\n setHtmlInputValue(key, config[key]);\r\n });\r\n}", "encodeFormElement(toMerge = {}) {\n // browser behavior no element name no encoding (normal submit fails in that case)\n // https:// issues...
[ "0.6819576", "0.60150915", "0.60041034", "0.57366395", "0.565279", "0.5570035", "0.555546", "0.55536515", "0.5540337", "0.5540337", "0.5540337", "0.5540337", "0.5540337", "0.5540337", "0.5540337", "0.5540337", "0.5540337", "0.5540337", "0.5540337", "0.5540337", "0.5540337", ...
0.6088162
1
internally exposed methods needed for the interconnectivity
hasNext() { let isLimitsReached = this._limits != -1 && this.pos >= this._limits - 1; let isEndOfArray = this.pos >= this.values.length - 1; return !(isLimitsReached || isEndOfArray); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function NetworkUtil(){ \n}", "function NetworkUtil(){}", "connect() {}", "function Network() {}", "function Network() {}", "function Network() {}", "function Network() {}", "function Network() {}", "function _____SHARED_functions_____(){}", "function SyncPrivateApi() {}", "_setup (data) {\n ...
[ "0.6372725", "0.63308716", "0.61516356", "0.6133331", "0.6133331", "0.6133331", "0.6133331", "0.6133331", "0.6041289", "0.5749432", "0.5741841", "0.572449", "0.57202095", "0.5713961", "0.5704742", "0.57032204", "0.57032204", "0.57032204", "0.5703046", "0.5680656", "0.56775326...
0.0
-1
helper to fix a common dom problem we have to wait until a certain condition is met, in most of the cases we just want to know whether an element is present in the sub domtree before being able to proceed
waitUntilDom(condition, options = { attributes: true, childList: true, subtree: true, timeout: 500, interval: 100 }) { return __awaiter(this, void 0, void 0, function* () { return waitUntilDom(this, condition, options); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function waitForElementIfNotPresent(selector, ancestor) {\n return domReadyPromise.then(function() {\n if ($(selector).length > 0) {\n return resolvedPromise;\n }\n\n var defer = $.Deferred();\n $(ancestor).arrive(selector, { onceOnly: true }, funct...
[ "0.6879021", "0.668494", "0.6680552", "0.64883465", "0.6395291", "0.63831615", "0.6367775", "0.6285876", "0.6247574", "0.6230764", "0.6211067", "0.6188681", "0.61772305", "0.61772305", "0.6157479", "0.6133376", "0.6131043", "0.6020372", "0.6013679", "0.60003734", "0.59632736"...
0.6645034
3
returns the embedded shadow elements
get shadowElements() { let shadowElements = this.querySelectorAll("*") .filter(item => item.hasShadow); let mapped = (shadowElements.allElems() || []).map(element => element.shadowRoot); return new DomQuery(...mapped); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getFocusableElements() {\n return queryShadowRoot(this, isHidden, isFocusable);\n }", "function getTransitionableElements() {\n return [instance.popperChildren.tooltip, instance.popperChildren.backdrop, instance.popperChildren.content];\n }", "function getTransitionableElements() {\n return ...
[ "0.63549376", "0.6111105", "0.608889", "0.59976137", "0.59772545", "0.58226913", "0.5816733", "0.57753", "0.57298005", "0.5729176", "0.57220644", "0.57216066", "0.57216066", "0.57001257", "0.5678296", "0.5666547", "0.5659795", "0.5646069", "0.5635888", "0.5620882", "0.5619079...
0.77215856
1
sets the caret position
static setCaretPosition(ctrl, pos) { (ctrl === null || ctrl === void 0 ? void 0 : ctrl.focus) ? ctrl === null || ctrl === void 0 ? void 0 : ctrl.focus() : null; // the selection range is our caret position (ctrl === null || ctrl === void 0 ? void 0 : ctrl.setSelectiongRange) ? ctrl === null || c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setCaretToPos (input, pos,length=1) \n{\n setSelectionRange(input, pos, pos+length);\n input.blur();\n input.focus()\n}", "function fnSetCaretPosition(_dom, pos) {\n if ('selectionStart' in _dom) {\n _dom.setSelectionRange(pos, pos);\n } else { // IE below version 9\n ...
[ "0.80737644", "0.79734993", "0.79527116", "0.781647", "0.7769166", "0.7635728", "0.7628357", "0.7612737", "0.75093436", "0.74619246", "0.740138", "0.738567", "0.729326", "0.719301", "0.7169186", "0.70933956", "0.7089845", "0.6990794", "0.69648886", "0.6960913", "0.6929645", ...
0.74100167
11
Implementation of an iterator to allow loops over dom query collections
[Symbol.iterator]() { return { next: () => { let done = !this.hasNext(); let val = this.next(); return { done: done, value: val }; } }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getChildNodeIterator() {}", "iter() {\n return iter(this.root);\n }", "function iteratorFor(items) {\n\t\t var iterator = {\n\t\t next: function() {\n\t\t var value = items.shift()\n\t\t return {done: value === undefined, value: value}\n\t\t }\n\t\t }\n\t\t\n\t\t if (...
[ "0.6778303", "0.67002606", "0.65735173", "0.65674204", "0.6518314", "0.65049136", "0.64223945", "0.6417791", "0.6385852", "0.6385852", "0.6385852", "0.6385852", "0.6385852", "0.6385852", "0.6385852", "0.6385852", "0.6385852", "0.6385852", "0.6385276", "0.6359031", "0.63418525...
0.0
-1
Concatenates the elements of two Dom Queries into a single one
concat(toAttach, filterDoubles = true) { let domQueries = this.asArray; const ret = new DomQuery(...domQueries.concat(toAttach.asArray)); // we now filter the doubles out if (!filterDoubles) { return ret; } let idx = {}; // ie11 does not support sets, we have ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mergeTwoNodes(node1, node2) {\n node1.innerHTML = node1.innerHTML + node2.innerHTML\n return node1\n}", "function getAppendTo (queries) {\n var i;\n for (i = 0; i < queries.length; i++) {\n temp = document.querySelector(queries[i]);\n if (temp) {\n return temp;\n ...
[ "0.6095802", "0.59661824", "0.55352056", "0.5444795", "0.54121125", "0.5365593", "0.53577495", "0.5354147", "0.52925926", "0.5271214", "0.5261241", "0.52611095", "0.52142256", "0.51718575", "0.510262", "0.510052", "0.5083312", "0.5052244", "0.49319357", "0.4931513", "0.492877...
0.6830657
1
query selector all on the existing dom queryX object
_querySelectorAll(selector) { var _a, _b; if (!((_a = this === null || this === void 0 ? void 0 : this.rootNode) === null || _a === void 0 ? void 0 : _a.length)) { return this; } let nodes = []; for (let cnt = 0; cnt < this.rootNode.length; cnt++) { if (!(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function queryAll(selector){return(protoOrDescriptor,// tslint:disable-next-line:no-any decorator\nname)=>{const descriptor={get(){return this.renderRoot.querySelectorAll(selector)},enumerable:!0,configurable:!0};return name!==void 0?legacyQuery(descriptor,protoOrDescriptor,name):standardQuery(descriptor,protoOrDe...
[ "0.73940915", "0.7312936", "0.72057533", "0.6980065", "0.68554", "0.6746893", "0.6741895", "0.669415", "0.66581476", "0.66581476", "0.66108584", "0.6598153", "0.6547526", "0.6520602", "0.64217347", "0.6399225", "0.6397394", "0.6382337", "0.6352274", "0.6347676", "0.6347676", ...
0.65346766
14
deep with a selector and a pseudo /shadow/ marker to break into the next level
_querySelectorAllDeep(selector) { var _a; if (!((_a = this === null || this === void 0 ? void 0 : this.rootNode) === null || _a === void 0 ? void 0 : _a.length)) { return this; } let foundNodes = new DomQuery(...this.rootNode); let selectors = selector.split(/\/shadow...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_closestDeep(selector) {\n var _a;\n if (!((_a = this === null || this === void 0 ? void 0 : this.rootNode) === null || _a === void 0 ? void 0 : _a.length)) {\n return this;\n }\n let foundNodes = new DomQuery(...this.rootNode);\n let selectors = selector.split(/\\/sha...
[ "0.5542242", "0.5542242", "0.5470496", "0.5016422", "0.49771616", "0.49390376", "0.49373716", "0.4911626", "0.48199433", "0.47994158", "0.4791689", "0.47830656", "0.47830656", "0.4775107", "0.47454977", "0.47010842", "0.46874496", "0.46765324", "0.4673384", "0.46630982", "0.4...
0.57996255
1
query selector all on the existing dom queryX object
_closest(selector) { var _a, _b; if (!((_a = this === null || this === void 0 ? void 0 : this.rootNode) === null || _a === void 0 ? void 0 : _a.length)) { return this; } let nodes = []; for (let cnt = 0; cnt < this.rootNode.length; cnt++) { if (!((_b = thi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function queryAll(selector){return(protoOrDescriptor,// tslint:disable-next-line:no-any decorator\nname)=>{const descriptor={get(){return this.renderRoot.querySelectorAll(selector)},enumerable:!0,configurable:!0};return name!==void 0?legacyQuery(descriptor,protoOrDescriptor,name):standardQuery(descriptor,protoOrDe...
[ "0.7393112", "0.7311443", "0.72055876", "0.69790864", "0.6854527", "0.6745029", "0.6741195", "0.6692739", "0.6657361", "0.6657361", "0.66097397", "0.65989083", "0.6547038", "0.653356", "0.653356", "0.6520871", "0.6420012", "0.6398348", "0.6398035", "0.63810664", "0.635138", ...
0.0
-1
deep with a selector and a pseudo /shadow/ marker to break into the next level
_closestDeep(selector) { var _a; if (!((_a = this === null || this === void 0 ? void 0 : this.rootNode) === null || _a === void 0 ? void 0 : _a.length)) { return this; } let foundNodes = new DomQuery(...this.rootNode); let selectors = selector.split(/\/shadow\//); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_querySelectorAllDeep(selector) {\n var _a;\n if (!((_a = this === null || this === void 0 ? void 0 : this.rootNode) === null || _a === void 0 ? void 0 : _a.length)) {\n return this;\n }\n let foundNodes = new DomQuery(...this.rootNode);\n let selectors = selector.spli...
[ "0.57971823", "0.57971823", "0.54697126", "0.5014661", "0.4975373", "0.49360976", "0.49355063", "0.49109304", "0.48182318", "0.47973052", "0.4788783", "0.4780654", "0.4780654", "0.47729754", "0.47423714", "0.46986392", "0.46853584", "0.46749696", "0.4673639", "0.46623805", "0...
0.55393404
3
source: https:// developer.mozilla.org/enUS/docs/Web/API/Element/matches code snippet license: https:// creativecommons.org/licenses/bysa/2.5/ matches selector call in a browser independent manner
_mozMatchesSelector(toMatch, selector) { let prototypeOwner = toMatch; let matchesSelector = prototypeOwner.matches || prototypeOwner.matchesSelector || prototypeOwner.mozMatchesSelector || prototypeOwner.msMatchesSelector || prototypeOwner.oMatchesSelecto...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "matches(selector) {\n const el = this.node;\n return (el.matches || el.matchesSelector || el.msMatchesSelector || el.mozMatchesSelector || el.webkitMatchesSelector || el.oMatchesSelector).call(el, selector);\n }", "function matches(node, selector) {\n if (!matchesImpl) {\n var body = document.body;\n ...
[ "0.79521155", "0.7507268", "0.7360756", "0.7310906", "0.7310906", "0.7310906", "0.7274126", "0.7274126", "0.7274126", "0.7273361", "0.72517616", "0.7184823", "0.7098044", "0.7093064", "0.7065866", "0.7065866", "0.6995691", "0.6960642", "0.6857268", "0.6829869", "0.67798024", ...
0.7036206
17
sticky nonsticky unified code of the load script eval implementation if programmatic >script src="... loading
_loadScriptEval(sticky, src, delay = 0, nonce) { let srcNode = this.createSourceNode(src, nonce); let nonceCheck = this.createSourceNode(null, nonce); let marker = `nonce_${Date.now()}_${Math.random()}`; nonceCheck.innerHTML = `document.head["${marker}"] = true`; // noop let head...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_eval() {\n if (this._alreadyStarted) {\n return;\n }\n\n // TODO: this text check doesn't seem completely the same as the spec, which e.g. will try to execute scripts with\n // child element nodes. Spec bug? https://github.com/whatwg/html/issues/3419\n if (!this.hasAttributeNS(null, \"src\") &...
[ "0.70275676", "0.69039655", "0.6785047", "0.67130774", "0.6654534", "0.6634733", "0.66291946", "0.65942824", "0.6592139", "0.65821624", "0.65821624", "0.65618706", "0.6551937", "0.6442019", "0.64294654", "0.64190507", "0.641413", "0.64014333", "0.64014333", "0.6380404", "0.63...
0.7696767
1
resolves an attribute holder compared
resolveAttributeHolder(attrName = "value") { let ret = []; ret[attrName] = null; return (attrName in this.getAsElem(0).value) ? this.getAsElem(0).value : ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}// If the object is an opaque reference ID, it's expected that\n// the next prop is different than the server value, so just return\n// expected\nif(isOpaqueHydratingObject(expected)){return expected;}if(!node.hasAttribute(na...
[ "0.57492834", "0.57492834", "0.5690135", "0.5638557", "0.5608352", "0.55649155", "0.5486734", "0.5483932", "0.5483932", "0.5483932", "0.5483932", "0.546462", "0.546462", "0.546462", "0.546462", "0.5436844", "0.54356575", "0.5408621", "0.53527886", "0.53527886", "0.53527886", ...
0.57344353
3
! Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file...
function _global$() { var _a; let _global$ = ('undefined' != typeof globalThis && globalThis.window) ? globalThis.window : ('undefined' != typeof window) ? window : ('undefined' != typeof globalThis) ? globalThis : ('undefined' != typeof __webpack_require__.g && (__webpack_re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get UseGlobal() {}", "set UseGlobal(value) {}", "function sharingIsCaring() {\n console.log(globalVar)\n}", "function globalFunction(){\n console.log(globalVariable);\n}", "function AccessVariableGlobally() {\n globalName=\"Block360\"\n var localVariable=\"CIE-NUST\"\n}", "get global() {\n ret...
[ "0.6561723", "0.63754314", "0.62610084", "0.6131208", "0.58863807", "0.5849093", "0.5825195", "0.57884026", "0.5706611", "0.56989753", "0.56405985", "0.56260896", "0.56083125", "0.5593105", "0.5536961", "0.5511217", "0.54635566", "0.5442688", "0.54379", "0.543308", "0.5426522...
0.0
-1
should be in lang, but for now here to avoid recursive imports, not sure if typescript still has a problem with those helper function to safely resolve anything this is not an elvis operator, it resolves a value without exception in a tree and if it is not resolvable then an optional of a default value is restored or O...
function saveResolve(resolverProducer, defaultValue = null) { try { let result = resolverProducer(); return Monad_1.Optional.fromNullable(result !== null && result !== void 0 ? result : defaultValue); } catch (e) { return Monad_1.Optional.absent; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "resolve(resolver) {\n if (this.isAbsent()) {\n return Optional.absent;\n }\n try {\n return Optional.fromNullable(resolver(this.value));\n }\n catch (e) {\n return Optional.absent;\n }\n }", "function r(e){return function(){return a.de...
[ "0.5828602", "0.56280303", "0.5580851", "0.55573773", "0.5523418", "0.5434297", "0.54138577", "0.54138577", "0.5380137", "0.53725994", "0.5368699", "0.53572893", "0.5307659", "0.5307659", "0.5300903", "0.5253311", "0.5250124", "0.521521", "0.5192579", "0.5190069", "0.5186969"...
0.55887544
2
lazy resolve... aka the function is called on resolve and a default value also is a producing function (called only if the original producer does not produce any result)
function saveResolveLazy(resolverProducer, defaultValue = null) { try { let result = resolverProducer(); return Monad_1.Optional.fromNullable(result !== null && result !== void 0 ? result : defaultValue()); } catch (e) { return Monad_1.Optional.absent; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function r(e){return function(){return a.default.resolve(e)}}", "function saveResolve(resolverProducer, defaultValue = null) {\n try {\n let result = resolverProducer();\n return Monad_1.Optional.fromNullable(result !== null && result !== void 0 ? result : defaultValue);\n }\n...
[ "0.64235425", "0.6007112", "0.59168106", "0.58544844", "0.58455706", "0.5824653", "0.5801114", "0.56935346", "0.56312424", "0.5625321", "0.561671", "0.5574241", "0.55698574", "0.554014", "0.5532625", "0.55118656", "0.5511499", "0.54879946", "0.54723203", "0.547054", "0.546599...
0.66143936
0
hyperfast trim crossported from dojo
function trim(str) { str = str.replace(/^\s\s*/, ''); let ws = /\s/, i = str.length; while (ws.test(str.charAt(--i))) { //do nothing } return str.slice(0, i + 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function trim(thisTrimEnd) {\n var chop = theSlice.length - maxSize;\n if (chop <= 0) {\n return;\n }\n if (trimEnd !== 'auto') {\n thisTrimEnd = trimEnd;\n }\n if (thisTrimEnd === 'end') {\n theSlice = t...
[ "0.58454794", "0.5646147", "0.5441601", "0.53425306", "0.5300853", "0.52857625", "0.52715135", "0.52229846", "0.5134428", "0.5118428", "0.51076823", "0.50905865", "0.5076936", "0.50739324", "0.5055914", "0.50500566", "0.50383574", "0.5020226", "0.50000966", "0.4977889", "0.49...
0.0
-1
generic object arrays like dom definitions to array conversion method which transforms any object to something array like
function objToArray(obj, offset = 0, pack = []) { if ((obj !== null && obj !== void 0 ? obj : "__undefined__") == "__undefined__") { return pack !== null && pack !== void 0 ? pack : null; } //since offset is numeric we cannot use the shortcut due to 0 being false //special co...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeArray( obj ) {\n if ( Array.isArray( obj ) ) {\n // use object if already an array\n return obj;\n }\n \n var isArrayLike = typeof obj == 'object' && typeof obj.length == 'number';\n if ( isArrayLike ) {\n // convert nodeList to array\n return arraySlice.call( obj );\n...
[ "0.73576236", "0.7345266", "0.7300137", "0.7298798", "0.72899204", "0.7267053", "0.72147083", "0.72033465", "0.7190602", "0.7190602", "0.7190602", "0.7190602", "0.7190602", "0.7190602", "0.7190602", "0.7190602", "0.7190602", "0.71678865", "0.7164348", "0.7164348", "0.7162694"...
0.64328086
91
equalsIgnoreCase, caseinsensitive comparison of two strings
function equalsIgnoreCase(source, destination) { let finalSource = source !== null && source !== void 0 ? source : "___no_value__"; let finalDest = destination !== null && destination !== void 0 ? destination : "___no_value__"; //in any other case we do a strong string comparison return ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function equalsIgnoreCase(str1, str2){\n\tif(str1 == undefined || str2 == undefined){\n\t\treturn false;\n\t}\n\treturn (str1.toString().toUpperCase() == str2.toString().toUpperCase());\n}", "function compare_strings(firstString, secondString) {\n return firstString.toLowerCase() === secondString.toLowerCase(...
[ "0.8103611", "0.79156584", "0.78076553", "0.77959204", "0.7757864", "0.7755425", "0.7721412", "0.7708132", "0.7692509", "0.7530336", "0.7517929", "0.74964106", "0.74964106", "0.7495919", "0.7420388", "0.7384454", "0.7372544", "0.7372544", "0.7365144", "0.72982645", "0.7288988...
0.73166454
19
Backported, a failsafe determination code for checking whether an object is a function
function isFunc(it) { return it instanceof Function || typeof it === "function"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isFunction(object) { return typeof object === 'function'; }", "function isFn (x) { return typeof x === 'function' }", "function isFunction( obj ){\n return Object.prototype.toString.call( obj ) == \"[object Function]\";\n }", "function isFunction(obj) {\n return typeof obj === \"functio...
[ "0.8295357", "0.82777417", "0.8011911", "0.7983203", "0.7983203", "0.79726595", "0.79726595", "0.79622793", "0.7954744", "0.7881827", "0.7829507", "0.7829507", "0.7773261", "0.77550364", "0.77550364", "0.7685971", "0.76610106", "0.7646724", "0.7638823", "0.7605372", "0.759059...
0.72777283
28
syntactic sugar for absent and present checks
isAbsent() { return "undefined" == typeof this.value || null == this.value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function present( thing ) {\n return !blank(thing);\n}", "function absenty(x) {\n return !existy(x);\n}", "isAbsent() {\n return this.length == 0;\n }", "isAbsent() {\n return this.length == 0;\n }", "isNotDefined(val) {\n return val === undefined;\n }", "function existy(v...
[ "0.72153765", "0.641054", "0.62125534", "0.62125534", "0.6003508", "0.59316885", "0.59055203", "0.5859024", "0.5859024", "0.5815948", "0.5812555", "0.5807861", "0.5807861", "0.5792279", "0.5790074", "0.5783256", "0.5783256", "0.577073", "0.57536006", "0.57536006", "0.57536006...
0.67047024
1
lazy, passes a function which then is lazily evaluated instead of a direct value
orElseLazy(func) { if (this.isPresent()) { return this; } else { return this.flatMap(func); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function lazy(f){\r\n return function(){\r\n return f().apply(null, arguments);\r\n }\r\n}", "function lazyEval(fn) {\n var result;\n return function() {\n if ( ! result ) {\n result = fn.call(this);\n }\n return result;\n };\n}", "function lazy(fn) {\n var cachedFn =...
[ "0.77029955", "0.7529469", "0.7364064", "0.71398926", "0.70741904", "0.7039752", "0.7039752", "0.70019245", "0.69305813", "0.677675", "0.6758596", "0.66885823", "0.65678656", "0.65521425", "0.6528692", "0.6496898", "0.63333845", "0.62201184", "0.60191923", "0.60191923", "0.60...
0.6225535
17
we need to implement it to fulfill the contract, although it is used only internally all values are flattened when accessed anyway, so there is no need to call this method
flatMap(fn) { let val = super.flatMap(fn); if (!(val instanceof Optional)) { return Optional.fromNullable(val.value); } return val.flatMap(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "flattenValue() {\n return this.toArray().reduce((acc, [, value]) => {\n acc = acc.concat(value);\n return acc;\n }, []);\n }", "flatten(){\n\n let scope = this;\n\n const result = new Map();\n const appliedValves = new Map();\n\n for(const [key, value] of scope._dataL...
[ "0.64680326", "0.58903694", "0.5810876", "0.57565004", "0.5685143", "0.566373", "0.5622612", "0.55731636", "0.55626965", "0.5488863", "0.5472694", "0.5442348", "0.5432503", "0.54229456", "0.54187626", "0.53846455", "0.5383551", "0.5382449", "0.5382002", "0.5378531", "0.537729...
0.0
-1
elvis operation, take care, if you use this you lose typesafety and refactoring capabilities, unfortunately typescript does not allow to have its own elvis operator this is some syntactic sugar however which is quite useful
getIf(...key) { key = this.preprocessKeys(...key); let currentPos = this; for (let cnt = 0; cnt < key.length; cnt++) { let currKey = this.keyVal(key[cnt]); let arrPos = this.arrayIndex(key[cnt]); if (currKey === "" && arrPos >= 0) { currentPos ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function f$7(e){return !!r$s(e)&&!e.visible}", "function Vy(t,e){var n=wi()(t);if(bi.a){var r=bi()(t);e&&(r=vi()(r).call(r,(function(e){return mi()(t,e).enumerable}))),n.push.apply(n,r)}return n}", "condense(v, e) { }", "function a(e){return void 0===e||null===e}", "function a(e){return void 0===e||null===...
[ "0.5960676", "0.553052", "0.55100244", "0.52226645", "0.52226645", "0.52226645", "0.520704", "0.52038395", "0.52002716", "0.5195499", "0.5195499", "0.5195499", "0.51833194", "0.5161638", "0.5136712", "0.51254094", "0.51011515", "0.50942075", "0.50819236", "0.50814646", "0.508...
0.0
-1
simple match, if the first order function call returns true then there is a match, if the value is not present it never matches
match(fn) { if (this.isAbsent()) { return false; } return fn(this.value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function match(valOne, valTwo){\n if (valOne === valTwo)\n return true\n else\n return false\n}", "function match(arg1, arg2) {\n if (arg1 === arg2)\n return true;\n else\n return false;\n }", "function match(arg1, arg2){ \n if (arg1 === arg2)\n return true\n else\n ...
[ "0.5700538", "0.5678336", "0.5639051", "0.55828995", "0.55065566", "0.5490553", "0.5481817", "0.5473241", "0.5396621", "0.5356902", "0.53524107", "0.53133935", "0.5260867", "0.52601105", "0.5240331", "0.52266616", "0.5174683", "0.5114822", "0.5112861", "0.5090321", "0.5076439...
0.63607603
0
helper to override several implementations in a more fluent way by having a getClass operation we can avoid direct calls into the constructor or static methods and do not have to implement several methods which rely on the type of "this"
getClass() { return Optional; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SuperclassBare() {}", "function SuperclassBare() {}", "function augment(receivingClass, givingClass) {\n \n console.log(\"step 1\");\n //only provide certain methods\n if (arguments[2]) {\n for (var i = 2, len = arguments.length; i < len; i++) {\n //console.log(arguments[...
[ "0.60330117", "0.60330117", "0.5815616", "0.5808801", "0.56331867", "0.56331867", "0.55555797", "0.5529054", "0.55062425", "0.54890954", "0.54306173", "0.5404906", "0.5404906", "0.5404906", "0.54022807", "0.54022807", "0.5396229", "0.53948027", "0.5388895", "0.5384756", "0.53...
0.0
-1
helper method for getIf with array access aka []
arrayIndex(key) { let start = key.indexOf("["); let end = key.indexOf("]"); if (start >= 0 && end > 0 && start < end) { return parseInt(key.substring(start + 1, end)); } else { return -1; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getIf(...accessPath) {\n this.assertAccessPath(...accessPath);\n return this.getClass().fromNullable((0, AssocArray_1.resolve)(this.value, ...accessPath));\n }", "getIf(...key) {\n key = this.preprocessKeys(...key);\n let currentPos = this;\n for (let cnt = 0; cnt < key.leng...
[ "0.6690465", "0.6552651", "0.60439706", "0.59903914", "0.5950913", "0.589506", "0.5867651", "0.5835042", "0.5796911", "0.56897986", "0.5670271", "0.558156", "0.5534619", "0.5510058", "0.5498094", "0.54864585", "0.5484396", "0.548243", "0.54590976", "0.545622", "0.54547286", ...
0.0
-1
helper method for getIf with array access aka []
keyVal(key) { let start = key.indexOf("["); if (start >= 0) { return key.substring(0, start); } else { return key; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getIf(...accessPath) {\n this.assertAccessPath(...accessPath);\n return this.getClass().fromNullable((0, AssocArray_1.resolve)(this.value, ...accessPath));\n }", "getIf(...key) {\n key = this.preprocessKeys(...key);\n let currentPos = this;\n for (let cnt = 0; cnt < key.leng...
[ "0.668993", "0.6552307", "0.60450345", "0.5990032", "0.5950854", "0.589629", "0.5867716", "0.58368427", "0.57992065", "0.5690895", "0.56705296", "0.55825347", "0.5535827", "0.551142", "0.5499857", "0.54865885", "0.5484796", "0.5479856", "0.5461741", "0.5456389", "0.54560035",...
0.0
-1
additional syntactic sugar which is not part of the usual optional implementation but makes life easier, if you want to sacrifice typesafety and refactoring capabilities in typescript
getIfPresent(key) { if (this.isAbsent()) { return this.getClass().absent; } return this.getClass().fromNullable(this.value[key]).flatMap(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function OptionalDecorator() {}", "function OptionalDecorator() {}", "function OptionalDecorator() {}", "get asOptional() {\n return optional(this.get, this.set)\n }", "function OptionalDecorator(){}// WARNING: interface has both a type and a value, skipping emit", "get None() {}", "get None() {}",...
[ "0.6385939", "0.6385939", "0.6385939", "0.6362642", "0.6361141", "0.63444585", "0.63444585", "0.63444585", "0.63444585", "0.6282112", "0.6282112", "0.6074949", "0.59883726", "0.5905347", "0.5874898", "0.5772435", "0.5707221", "0.5653657", "0.56133515", "0.5598618", "0.559069"...
0.0
-1
elvis like typesafe functional save resolver a typesafe option for getIfPresent usage myOptional.resolve(value => value.subAttr.subAttr2).orElseLazy(....) if this is resolvable without any errors an Optional with the value is returned if not, then an Optional absent is returned, also if you return Optional absent it is...
resolve(resolver) { if (this.isAbsent()) { return Optional.absent; } try { return Optional.fromNullable(resolver(this.value)); } catch (e) { return Optional.absent; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get asOptional() {\n return optional(this.get, this.set)\n }", "getIfPresent(key) {\n if (this.isAbsent()) {\n return this.getClass().absent;\n }\n return this.getClass().fromNullable(this.value[key]).flatMap();\n }", "get optional() {\n return this._optional;\n ...
[ "0.62936395", "0.56584483", "0.54221976", "0.5283042", "0.5267895", "0.5256243", "0.5256138", "0.52046746", "0.51866084", "0.517161", "0.51000744", "0.5095919", "0.50481904", "0.5024449", "0.49614066", "0.49450067", "0.49334154", "0.49292928", "0.49066284", "0.489239", "0.489...
0.60681105
1
helper to override several implementations in a more fluent way by having a getClass operation we can avoid direct calls into the constructor or static methods and do not have to implement several methods which rely on the type of "this"
getClass() { return ValueEmbedder; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SuperclassBare() {}", "function SuperclassBare() {}", "function augment(receivingClass, givingClass) {\n \n console.log(\"step 1\");\n //only provide certain methods\n if (arguments[2]) {\n for (var i = 2, len = arguments.length; i < len; i++) {\n //console.log(arguments[...
[ "0.60322744", "0.60322744", "0.58156866", "0.5808989", "0.5632191", "0.5632191", "0.55553067", "0.55288637", "0.5507097", "0.54880965", "0.54305476", "0.5405601", "0.5405601", "0.5405601", "0.5402976", "0.5402976", "0.5396244", "0.53947675", "0.5389169", "0.53850186", "0.5374...
0.0
-1
in order to filter we have to make a look ahead until the first next allowed element hence we prefetch the element and then serve it via next
hasNext() { let steps = 1; let found = false; let next; while (!found && (next = this.inputDataSource.lookAhead(steps)) != ITERATION_STATUS.EO_STRM) { if (this.filterFunc(next)) { this._filterIdx[this._unfilteredPos + steps] = true; found = tru...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "next (selector = '*') {\n let result = new Set()\n\n for (let item of this) {\n let nextNode = getNextNodeSibling(this[GET_NODE_PARENT](item), item)\n\n if (nextNode) {\n result.add(nextNode)\n }\n }\n\n let $elements = new this.constructor([...result])\n\n return $elements.fil...
[ "0.6196649", "0.57101035", "0.56071967", "0.53851974", "0.5315449", "0.5263504", "0.52612877", "0.52169555", "0.519752", "0.5196623", "0.51254064", "0.5036035", "0.49900872", "0.49890688", "0.49820146", "0.497212", "0.49477237", "0.49441686", "0.49331233", "0.49324045", "0.49...
0.467847
64
serve the next element
next() { var _a, _b; let found = ITERATION_STATUS.EO_STRM; while (this.inputDataSource.hasNext()) { this._unfilteredPos++; let next = this.inputDataSource.next(); //again here we cannot call the filter function twice, because its state might change, so if inde...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "next() {\n this._next();\n }", "next() {\n this.index++;\n }", "get next() {\n return this._next;\n }", "get next() {\n return this._next;\n }", "next() {\n return iter.next();\n }", "next() {\n return iter.next();\n...
[ "0.75186306", "0.73274547", "0.7173203", "0.7173203", "0.70729804", "0.70729804", "0.70729804", "0.70729804", "0.70729804", "0.70729804", "0.70729804", "0.70729804", "0.70729804", "0.70729804", "0.70729804", "0.70729804", "0.7053942", "0.7041463", "0.7039089", "0.6881145", "0...
0.0
-1
looks ahead cnt without changing the internal data "pointers" of the data source (this is mostly needed by LazyStreams, because they do not know by definition their boundaries)
lookAhead(cnt = 1) { var _a; let lookupVal; for (let loop = 1; cnt > 0 && (lookupVal = this.inputDataSource.lookAhead(loop)) != ITERATION_STATUS.EO_STRM; loop++) { let inCache = (_a = this._filterIdx) === null || _a === void 0 ? void 0 : _a[this._unfilteredPos + loop]; if...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "peek(n) {\n return n ?\n this.input[this.curr + n] :\n this.input[this.curr + 1]\n }", "function _next() {\n _pos ++;\n var t1 = i < d.length ? d[i] : null;\n var t2 = j < _data.length ? _data[j] : null;\n if (!t1 && !t2) {\n return null;\n }\n if (!t1) {\n ...
[ "0.53996503", "0.5388592", "0.5323978", "0.5264925", "0.5261603", "0.5154347", "0.51442015", "0.49981314", "0.4996025", "0.49946725", "0.4977741", "0.49772394", "0.49331975", "0.48720014", "0.48582736", "0.48258677", "0.48234168", "0.481485", "0.48106915", "0.48106915", "0.48...
0.60993445
0
collect and encode data for a given form element (must be of type form) find the jakarta.faces.ViewState element and encode its value as well! return a concatenated string of the encoded values!
function getViewState(formElement) { return AjaxImpl_1.Implementation.getViewState(formElement); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "encodeFormElement(toMerge = {}) {\n // browser behavior no element name no encoding (normal submit fails in that case)\n // https:// issues.apache.org/jira/browse/MYFACES-2847\n if (this.name.isAbsent()) {\n return;\n }\n // let´s keep it side-effects free\n let...
[ "0.5709476", "0.56688327", "0.56092465", "0.5598425", "0.5555312", "0.55127275", "0.5434036", "0.5415505", "0.5415197", "0.5408864", "0.53868896", "0.5353299", "0.53228194", "0.529409", "0.52213657", "0.5195334", "0.51583415", "0.5009591", "0.5008244", "0.49994513", "0.492080...
0.5305188
13
returns the window identifier for the given node / window
function getClientWindow(rootNode) { return AjaxImpl_1.Implementation.getClientWindow(rootNode); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getWindowId(window) {\n return window.QueryInterface(Components.interfaces.nsIInterfaceRequestor).getInterface(Components.interfaces.nsIDOMWindowUtils).outerWindowID;\n }", "function getNodeWindow(node){\r\n\t\treturn node.ownerDocument.defaultView;\r\n\t}", "get id() {\n return this._f...
[ "0.75895554", "0.6830347", "0.6432711", "0.6313773", "0.60564184", "0.5882348", "0.587469", "0.5833696", "0.5817137", "0.5703567", "0.5701363", "0.5696857", "0.5688292", "0.5675111", "0.5656158", "0.5656158", "0.5656158", "0.56026673", "0.55811226", "0.5534154", "0.5534154", ...
0.5775111
9
Adds a global event listener to the ajax event queue. The event listener must be a function of following format: function eventListener(&lt;eventData&gt;)
function addOnEvent(eventFunc) { AjaxImpl_1.Implementation.addOnEvent(eventFunc); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addOnEvent(eventListener) {\n eventQueue.push(eventListener);\n }", "on(event: string, listener: Function): void {\n if (typeof this.__events[event] !== 'object') {\n this.__events[event] = [];\n }\n\n this.__events[event].push(listener);\n }", "function ad...
[ "0.72161394", "0.6668174", "0.6607946", "0.65256906", "0.6420954", "0.6213754", "0.6209127", "0.6147802", "0.6147044", "0.61469775", "0.61442965", "0.6107964", "0.61015856", "0.61015856", "0.61015856", "0.61015856", "0.6073805", "0.60704285", "0.60700333", "0.6069264", "0.605...
0.6609837
2
AB function similar to mojarra and Primefaces not part of the spec but a convenience accessor method Code provided by Thomas Andraschko
function ab(source, event, eventName, execute, render, options = {}) { var _a, _b; if (eventName) { options[Const_1.CTX_OPTIONS_PARAMS] = (_a = options === null || options === void 0 ? void 0 : options[Const_1.CTX_OPTIONS_PARAMS]) !== null && _a !== void 0 ? _a : {}; options[Cons...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get Custom() {}", "get property(){}", "get foo() {\n return this.getAttribute('foo'); \n }", "get value() {\n return this.#el?.value ?? this.#value;\n }", "get() {\n return null;\n }", "get property() {\n return super.property;\n }", "static get visible() {}", "get () {\n ...
[ "0.5854643", "0.578397", "0.5726124", "0.55814266", "0.55505866", "0.5493384", "0.54319125", "0.54194903", "0.53949374", "0.5393708", "0.53931624", "0.53700286", "0.53570795", "0.5350069", "0.53271586", "0.53200656", "0.531651", "0.531651", "0.531651", "0.531651", "0.53075296...
0.0
-1
noinspection JSUnusedGlobalSymbols Helper function in the myfaces namespace to handle document ready properly for the load case the ajax case, does not need proper treatment, since it is deferred anyway. Used by command script as helper function!
function onDomReady(executionFunc) { if (document.readyState !== "complete") { onReadyChain.push(executionFunc); if (!readyStateListener) { readyStateListener = () => { window.removeEventListener("DOMContentLoaded", readyStateListener); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ajax_Load() {\n //$(\".consoleLogOutput\").append('<div class=\"consoleLog_helm\">ajax_Load() event starting.</div>');\n \n if (helm.alreadyInitialized && helm.RefreshHelmDataAfterUpdatePanelPostBack) {\n helm.jQueryBindEvents();\n helm.Initialize(true); //true -...
[ "0.679124", "0.65154624", "0.64949304", "0.64426726", "0.64426726", "0.64426726", "0.64426726", "0.64227486", "0.6370064", "0.63681316", "0.63184035", "0.6318288", "0.62433803", "0.6226461", "0.61929876", "0.61573195", "0.61472136", "0.61435056", "0.61370873", "0.60970867", "...
0.0
-1
this is for testing purposes only, since AjaxImpl is a module we need to reset for every unit test its internal states
function reset() { projectStage = null; separator = null; eventQueue = []; errorQueue = []; Implementation.requestQueue = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clearInternalState() {\n window.clearTimeout(this.loadTimer_);\n window.clearTimeout(this.backOffTimer_);\n this.isPerformingRequests_ = false;\n this.reloadRequested_ = false;\n }", "function reset() {\n\n factory.error = null;\n factory.success = null;\n\n }"...
[ "0.6559967", "0.6281433", "0.626175", "0.626175", "0.62475973", "0.616023", "0.61222804", "0.6087641", "0.6054582", "0.6050923", "0.60380304", "0.60380304", "0.6033309", "0.60191673", "0.6004586", "0.59930396", "0.5984965", "0.59831405", "0.598182", "0.5967344", "0.595586", ...
0.5556761
75
resolves the project stage as url parameter
function resolveProjectStateFromURL() { /* run through all script tags and try to find the one that includes faces.js */ const foundStage = ExtDomQuery_1.ExtDomQuery.searchJsfJsFor(/stage=([^&;]*)/).value; return (foundStage in ProjectStages) ? foundStage : ProjectStages.Production; // MYFACES-4...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function locationProjectName () {\n return document.location.toString().match(/\\project=(.+)$/)[1];\n}", "function stageInstanceUrl(pipeline) {\n var pipeline_name = pipeline.name;\n var pipeline_counter = pipeline._embedded.instances[0].label;\n var stage_name = pipeline._embedded.instances[0]._embedded....
[ "0.6517078", "0.62802356", "0.6279852", "0.62767535", "0.6184846", "0.595013", "0.5872973", "0.58643544", "0.57341063", "0.56501466", "0.557322", "0.55723137", "0.5542238", "0.5519508", "0.55034673", "0.54653466", "0.54488283", "0.5427419", "0.54249144", "0.5409863", "0.53983...
0.67250377
0
implementation of the faces.util.chain functionality
function chain(source, event, ...funcs) { // we can use our lazy stream each functionality to run our chain here. // by passing a boolean as return value into the onElem call // we can stop early at the first false, just like the spec requests let ret; funcs.every(func => { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "chain (_) {\n return this \n }", "['fantasy-land/chain'](f) {\n return this.chain(f);\n }", "function Chain () {\n // Steps array\n this.stack = []\n this.steps = []\n this.currentStepIndex = 0\n}", "chain(_) {\n return this\n }", "chain(chainFn) {\n return chain(chainFn, this);\n ...
[ "0.6929501", "0.6928587", "0.66860867", "0.66489154", "0.66207004", "0.6498897", "0.6299012", "0.62717146", "0.62712395", "0.6200572", "0.61811405", "0.6150222", "0.61441284", "0.5984407", "0.59599847", "0.59260535", "0.5913037", "0.5913037", "0.5913037", "0.5913037", "0.5913...
0.0
-1
this function has to send the ajax requests following request conditions must be met: the request must be sent asynchronously! the request must be a POST!!! request the request url must be the form action attribute all requests must be queued with a client side request queue to ensure the request ordering!
function request(el, event, opts) { var _a, _b, _c, _d, _e; const { options, elem, elementId, windowId, isResetValues } = (0, RequestDataResolver_1.resolveDefaults)(event, opts, el); const requestCtx = new ExtDomQuery_1.ExtConfig({}); const internalCtx = new ExtDomQuery_1.ExtConfig({}); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_submitData(event) {\n\n // prevent submit form\n event.preventDefault();\n\n if( !this._controlDataBeforeSend() ) {\n document.body.scrollTop = document.documentElement.scrollTop = 0;\n return;\n }\n\n //let xhr = new XMLHttpRequest();\n let data = {...
[ "0.6959653", "0.690198", "0.68758106", "0.65527076", "0.65521747", "0.6442066", "0.63319874", "0.6321301", "0.63056135", "0.6293099", "0.62888527", "0.62818563", "0.6272543", "0.62371105", "0.6217084", "0.6207229", "0.61781543", "0.6169505", "0.6162515", "0.6139015", "0.61118...
0.0
-1
adds an error handler to the error queue
function addOnError(errorListener) { errorQueue.push(errorListener); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ErrorHandler() {}", "addOnItemErrorCallbacks(fn) {\r\n this.onItemErrorCallbacks.push(fn);\r\n }", "function errorHandler(error) {\n $('#app-status-ul').append('<li>[errorHandler] ' + error + '</li>');\n }", "gotError (error) {\n\t\tthis.handlers.onError(error) // tell the handle...
[ "0.67211217", "0.6446826", "0.627535", "0.62516403", "0.616519", "0.61479926", "0.61474496", "0.6063922", "0.60482574", "0.60314924", "0.6019883", "0.6015485", "0.60090727", "0.5992621", "0.59805727", "0.595724", "0.5948547", "0.5948012", "0.593256", "0.5920337", "0.58900654"...
0.69002783
0
adds an event handler to the event queue
function addOnEvent(eventListener) { eventQueue.push(eventListener); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addListener(eventName, handler) {\r\n if (eventName in this.events === false) this.events[eventName] = [];\r\n\r\n this.events[eventName].push(handler);\r\n }", "addHandler(handler) {\n handlers.push(handler);\n }", "_addMessageListener({\n eventHandler,\n eventName,\n ...
[ "0.70899755", "0.68286335", "0.67354715", "0.67304426", "0.65622306", "0.6517535", "0.6517535", "0.65051377", "0.6500141", "0.6474375", "0.6469516", "0.64510626", "0.6384614", "0.6342602", "0.63178045", "0.63138443", "0.62944436", "0.6265627", "0.620994", "0.6203863", "0.6166...
0.7179604
0
noinspection JSUnusedLocalSymbols sends an event to the event handlers
function sendEvent(data, localHandler = function (data) { }) { /*now we serve the queue as well*/ localHandler(data); eventQueue.forEach(fn => fn(data)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHand...
[ "0.7081658", "0.7081658", "0.7081658", "0.7081658", "0.7081658", "0.7081658", "0.7081658", "0.7081658", "0.7081658", "0.7081658", "0.7081658", "0.7081658", "0.7081658", "0.7081658", "0.7081658", "0.7081658", "0.7081658", "0.7081658", "0.7081658", "0.7043256", "0.68516564", ...
0.6249422
57
error handler behavior called internally and only into the impl it takes care of the internal message transformation to a myfaces internal error and then uses the standard send error mechanisms also a double error logging prevention is done as well
function stdErrorHandler(request, context, exception, clearRequestQueue = false) { //newer browsers do not allow to hold additional values on native objects like exceptions //we hence capsule it into the request, which is gced automatically //on ie as well, since the stdErrorHandler usually is c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "error(node) {\n /**\n * <error>\n * <error-name>String</error-name>\n * <error-message><![CDATA[message]]></error-message>\n * <error>\n */\n const mergedErrorData = new ExtDomQuery_1.ExtConfig({});\n mergedErrorData.assign(Const_1.SOURCE).valu...
[ "0.67143756", "0.66336364", "0.6585647", "0.6362707", "0.62624913", "0.6238441", "0.6223685", "0.6214877", "0.6174698", "0.6173083", "0.61149085", "0.61086047", "0.6103866", "0.6103048", "0.6103048", "0.61011165", "0.6093662", "0.6093662", "0.60821134", "0.60632616", "0.60574...
0.58802444
43
Methods the idea is to replace some placeholder parameters with their respective values
function assignRender(requestOptions, targetContext, issuingForm, sourceElementId) { if (requestOptions.getIf(Const_1.CTX_PARAM_RENDER).isPresent()) { remapDefaultConstants(targetContext.getIf(Const_1.CTX_PARAM_REQ_PASS_THR).get({}), Const_1.P_RENDER, requestOptions.getIf(Const_1.CTX_PARAM_RENDER).v...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "*processParametersDefaultValues(parameters) {\n for (let param of parameters) {\n switch (param.type) {\n case utils_1.ParameterType.BOOLEAN:\n yield {\n name: param.name,\n type: param.type,\n ...
[ "0.63456404", "0.6214559", "0.60574085", "0.60408264", "0.6034992", "0.59373677", "0.585572", "0.5804026", "0.5775529", "0.57570904", "0.57546467", "0.57352906", "0.5705595", "0.5691246", "0.5688936", "0.56545526", "0.56537163", "0.562254", "0.562254", "0.5621255", "0.561487"...
0.0
-1
the idea is to replace some placeholder parameters with their respective values
function assignExecute(requestOptions, targetContext, issuingForm, sourceElementId) { if (requestOptions.getIf(Const_1.CTX_OPTIONS_EXECUTE).isPresent()) { /*the options must be a blank delimited list of strings*/ /*compliance with Mojarra which automatically adds @this to an execute ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SBRecordsetPHP_replaceParamsWithVals(sql, sqlParams)\r\n{\r\n var statement = sql;\r\n \r\n for (var i = 0; i < sqlParams.length; i++)\r\n {\r\n var theParam = sqlParams[i];\r\n var theParamVal = String(theParam.defaultValue).replace(/'/g, \"''\");\r\n var myRe = new RegExp(\"\\\\b\" + thePar...
[ "0.6327973", "0.6208278", "0.61782223", "0.61646193", "0.5846263", "0.5804562", "0.57509047", "0.5740614", "0.57071275", "0.5698436", "0.5680296", "0.56679034", "0.56502867", "0.56422645", "0.5603256", "0.5598981", "0.55585974", "0.55209523", "0.5491163", "0.5489921", "0.5489...
0.0
-1
apply the browser tab where the request was originating from
function assignClientWindowId(form, targetContext) { let clientWindow = (0, Const_1.$faces)().getClientWindow(form.getAsElem(0).value); if (clientWindow) { targetContext.assign(Const_1.CTX_PARAM_REQ_PASS_THR, Const_1.P_CLIENT_WINDOW).value = clientWindow; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "openRequestInTab() {\n let win = Services.wm.getMostRecentWindow();\n win.openUILinkIn(this.selectedRequest.url, \"tab\", { relatedToCurrent: true });\n }", "function updatePageFromCurrentDomain() {\n console.log('loadCurrentDomainSettings');\n chrome.tabs.query({ //This method output active URL \n ...
[ "0.6401485", "0.6327971", "0.62710065", "0.6110332", "0.6055981", "0.60153395", "0.6011829", "0.5981087", "0.59752864", "0.5943414", "0.5867184", "0.5855725", "0.58362174", "0.5818366", "0.58149177", "0.5812356", "0.5807783", "0.5803392", "0.57785517", "0.5771689", "0.5769028...
0.0
-1
determines the current naming container and assigns it internally
function assignNamingContainerData(internalContext, formElement) { const viewRootId = (0, RequestDataResolver_1.resolveViewRootId)(formElement); if (!!viewRootId) { internalContext.assign(Const_1.NAMED_VIEWROOT).value = true; internalContext.assign(Const_1.NAMING_CONTAINER_ID).va...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get containerName() {\n return this._containerName;\n }", "get containerName() {\n return this._containerName;\n }", "get containerName() {\n return this._containerName;\n }", "get containerName() {\n return this._containerName;\n }", "function assignName() {\n va...
[ "0.61525506", "0.61525506", "0.61525506", "0.61525506", "0.5983728", "0.57528555", "0.56347877", "0.55450356", "0.5509829", "0.546655", "0.5448812", "0.5440628", "0.5420872", "0.53833765", "0.53505325", "0.53005916", "0.52603227", "0.52603227", "0.5258432", "0.5254114", "0.52...
0.71001387
0
transforms the user values to the expected one with the proper none all form and this handling (note we also could use a simple string replace, but then we would have had double entries under some circumstances) there are several standardized constants which need a special treatment
function remapDefaultConstants(targetConfig, targetKey, userValues, issuingForm, issuingElementId, rootNamingContainerId = "") { //a cleaner implementation of the transform list method const SEP = (0, Const_1.$faces)().separatorchar; let iterValues = (userValues) ? trim(userValues).split(/\s+/gi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function convertValueToInputVars(value, toEval) {\n // if (value === undefined) return '';\n if (isNumber(value) || isInputArray(value) || isInput(value))\n return handleQuickReplace(value, toEval);\n\n // if (isCondition(value))\n return conditionHandler(value, toEval);\n}", "function sanitis...
[ "0.58224255", "0.5761554", "0.57014215", "0.56893593", "0.56893593", "0.5657676", "0.5657676", "0.5657676", "0.5657676", "0.5640356", "0.5639934", "0.563127", "0.562223", "0.5596876", "0.55629075", "0.5532325", "0.5511366", "0.55035144", "0.5502337", "0.5494064", "0.5472858",...
0.4981097
87
extracts the myfaces config parameters which provide extra functionality on top of JSF
function extractMyFacesParams(mappedOpts) { var _a; //we now can use the full code reduction given by our stream api //to filter return (_a = ofAssoc(mappedOpts) .filter((item => (item[0] == "myfaces"))) .reduce(collectAssoc, {})) === null || _a === void 0 ? void ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "createConfig() {\n return {\n facets: [{ key: 'main', fixedFactSheetType: 'Application' }],\n ui: {\n elements: createElements(this.settings),\n timeline: createTimeline(),\n update: (selection) => this.handleSelection(selection)\n }\n };\n }", "getExposedConfig() {\n ...
[ "0.5308909", "0.52596503", "0.5124384", "0.5082249", "0.49141905", "0.48810223", "0.4877042", "0.4850378", "0.48445207", "0.48327434", "0.48059782", "0.47754726", "0.47536507", "0.47526023", "0.47466534", "0.47426617", "0.4738455", "0.4721016", "0.4721016", "0.46889788", "0.4...
0.55033916
0
Private helper to execute a function or code fragment
function resolveAndExecute(source, event, func) { if ("string" != typeof func) { //function is passed down as chain parameter, can be executed as is return func.call(source, event) !== false; } else { //either a function or a string can be passed in case of a ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "execute(code){\n }", "function execute(){\n console.log(\"hey\");\n}", "function doIt() {\n eval(func);\n }", "function executeFunction(func) {\n return func.call();\n }", "function functionExecutor(functionName){\n\t\treturn functionName();\n\t}", "function exec...
[ "0.7084952", "0.6601483", "0.6596769", "0.6546994", "0.62990767", "0.6292694", "0.6246389", "0.6177675", "0.6089514", "0.60749185", "0.6070361", "0.6059524", "0.5949775", "0.5938554", "0.59233785", "0.59233785", "0.59123063", "0.59073716", "0.5883168", "0.58795846", "0.586260...
0.0
-1
Api implementations, exposed functions
function init(socketClientId, url, channel, onopen, onmessage, onerror, onclose, behaviors, autoConnect) { var _a, _b, _c; onclose = resolveFunction(onclose); if (!mona_dish_1.DQ.global().WebSocket) { // IE6-9. onclose(-1, channel); return; } let channelTo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function API(){}", "function API(){}", "function Api(){\n}", "function DataApi() { }", "function DataApi() { }", "function ApiClient() {\n\n}", "constructor (api) { this.api = api }", "constructor (api) { this.api = api }", "constructor (api) { this.api = api }", "function ApiServiceRegistry() {\...
[ "0.80029845", "0.80029845", "0.72206616", "0.68059295", "0.68059295", "0.67980623", "0.67326516", "0.67326516", "0.67326516", "0.6681725", "0.66609377", "0.6522759", "0.64729846", "0.64263225", "0.6412706", "0.63376784", "0.63287634", "0.623993", "0.62194186", "0.6115172", "0...
0.0
-1
bind the callbacks to the socket callbacks
bindCallbacks() { this.socket.onopen = (event) => this.onopen(event); this.socket.onmessage = (event) => this.onmmessage(event); this.socket.onclose = (event) => this.onclose(event); this.socket.onerror = (event) => this.onerror(event); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_setListeners(callback) {\n this._socket.on('close', hadError => this._onCloseEvent(hadError));\n this._socket.on('error', err => this._onError(err));\n this._socket.setTimeout(this._server.options.socketTimeout || SOCKET_TIMEOUT, () => this._onTimeout());\n this._socket.pipe(this._pars...
[ "0.73016137", "0.72731197", "0.7224932", "0.69353336", "0.68901765", "0.6828365", "0.6776603", "0.6701248", "0.6677768", "0.6629337", "0.66082436", "0.65728337", "0.6508425", "0.6435973", "0.64289564", "0.64260584", "0.6405984", "0.6397125", "0.6389984", "0.63755405", "0.6362...
0.86396056
0
helper to remap the namespaces variables for 2.3 from 2.3 to 4.0 every javax namespace has been changed to faces To take the compatibility layer out this method just has to be changed to a simple value passthrough
function $faces() { var _a; return ((_a = window === null || window === void 0 ? void 0 : window.faces) !== null && _a !== void 0 ? _a : window === null || window === void 0 ? void 0 : window.jsf); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addNamespacesToVariables(vars){\n\tvar nvars = [];\n\tfor(var i = 0; i<vars.length; i++){\n\t\tvar nvar = (vars[i].substring(0, 2) == \"v:\") ? vars[i] : \"v:\" + vars[i];\n\t\tnvars.push(nvar);\n\t}\n\treturn nvars;\n}", "get avoidNs(){ return [ this.xhtmlNS, this.svgNS, 'http://ns.adobe.com/2006/mxml/...
[ "0.5671003", "0.55019903", "0.5473712", "0.53973716", "0.533459", "0.533459", "0.533459", "0.533459", "0.533459", "0.533459", "0.52917594", "0.5248217", "0.517777", "0.5060155", "0.5036296", "0.5008106", "0.48970214", "0.48863184", "0.48863184", "0.48863184", "0.48863184", ...
0.0
-1
checks the xml for various issues which can occur and prevent a proper processing
function assertValidXMLResponse(responseXML) { assert(!responseXML.isAbsent(), Const_1.EMPTY_RESPONSE, Const_1.PHASE_PROCESS_RESPONSE); assert(!responseXML.isXMLParserError(), responseXML.parserErrorText(Const_1.EMPTY_STR), Const_1.PHASE_PROCESS_RESPONSE); assert(responseXML.querySelectorAll(Con...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleIfError($xml){\n var errorMsg = $xml.find(\"error\").text();\n if(errorMsg == null || errorMsg == undefined || errorMsg == '')\n return false;\n updateErrorBox(errorMsg);\n return true;\n}", "function handleIfError($xml){\n var errorMsg = $xml.find(\"error\").text();\n if(...
[ "0.6487114", "0.6487114", "0.63852316", "0.59600663", "0.58009", "0.5565849", "0.5510272", "0.54523265", "0.54319924", "0.54119086", "0.5357703", "0.52750504", "0.5269344", "0.526062", "0.5239781", "0.52248704", "0.5156831", "0.5141162", "0.5127043", "0.5103682", "0.5103682",...
0.48171484
49
internal helper which raises an error in the format we need for further processing
function raiseError(error, message, caller, title, name) { let finalTitle = title !== null && title !== void 0 ? title : Const_1.MALFORMEDXML; let finalName = name !== null && name !== void 0 ? name : Const_1.MALFORMEDXML; let finalMessage = message !== null && message !== void 0 ? message : Con...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "customFormatErrorFn(err){\n // original error will be set by express graphql when it detects an error i.e\n // thrown in the code (either by you or any 3rd party package)\n if(!err.originalError){\n return err;\n }\n const data = err.originalError.data;\n const ...
[ "0.66793936", "0.6492609", "0.6289513", "0.62191564", "0.6195556", "0.61312795", "0.610833", "0.6061483", "0.60335946", "0.6029254", "0.6022826", "0.5993957", "0.59719217", "0.5971715", "0.5916435", "0.5911306", "0.59092855", "0.58913666", "0.5861137", "0.58507496", "0.584874...
0.55992156
71
using the new typescript 3.7 compiler assertion functionality to improve compiler hinting we are not fully there yet, but soon
function assert(value, msg = Const_1.EMPTY_STR, caller = Const_1.EMPTY_STR, title = "Assertion Error") { if (!value) { throw Assertions.raiseError(new Error(), msg, caller, title); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function t(e,t){/* istanbul ignore if */\nif(!e)throw new Error(\"ASSERT: \"+t)}", "function t(e,t){/* istanbul ignore if */\nif(!e)throw new Error(\"ASSERT: \"+t)}", "function __JUAssert(){;}", "function assert(cond) {\n if (!cond) throw new Error('Assertion error');\n }", "function assert(cond) {\n ...
[ "0.6302188", "0.6302188", "0.5830043", "0.57197285", "0.5717012", "0.5694164", "0.5599729", "0.5595098", "0.5595098", "0.5595098", "0.5595098", "0.5595098", "0.5595098", "0.5595098", "0.5595098", "0.5595098", "0.558633", "0.55720025", "0.55168355", "0.5511008", "0.550792", ...
0.0
-1
resolve handler function which calls the then chain and after that finally
resolve(data) { this.thenFunctions.reduce((inputVal, thenFunc) => { return thenFunc(inputVal); }, data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function $Promise(arg) {\n\n if (typeof arg !== 'function') {\n throw new Error('argument not a function.');\n }\n\n this._handlerGroups = [];\n this._state = 'pending';\n this._internalResolve = function (passedValue) {\n\n if (this._state === 'pending') {\n this._value = p...
[ "0.6613657", "0.6532445", "0.64234173", "0.64143354", "0.6372796", "0.6361678", "0.631637", "0.62754047", "0.62678885", "0.62573504", "0.6230902", "0.6173823", "0.6169972", "0.61183244", "0.61064047", "0.60884637", "0.60884637", "0.60884637", "0.60884637", "0.60884637", "0.60...
0.59067994
40
reject handler function which triggers the catch chain
reject(data) { this.catchFunctions.reduce((inputVal, catchFunc) => { return catchFunc(inputVal); }, data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tryCatchReject(f, x, thisArg, next) {\n\t\t\t\ttry {\n\t\t\t\t\tnext.become(getHandler(f.call(thisArg, x)));\n\t\t\t\t} catch(e) {\n\t\t\t\t\tnext.become(new Rejected(e));\n\t\t\t\t}\n\t\t\t}", "function tryCatchReject(f, x, thisArg, next) {\n\t\t\ttry {\n\t\t\t\tnext.become(getHandler(f.call(thisArg, x...
[ "0.73614526", "0.7321933", "0.7321933", "0.7321933", "0.7321933", "0.7321933", "0.7321933", "0.7321933", "0.7321933", "0.6809092", "0.6603384", "0.65472096", "0.65330815", "0.6489903", "0.6489903", "0.6489903", "0.64835805", "0.6465491", "0.64630026", "0.64630026", "0.6463002...
0.66276824
10
register a catch functor
catch(func) { this.catchFunctions.push(func); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function catcher () { return fn }", "function wrap(socket, f) {\n try {\n return (data) => f(data)\n } catch (err) {\n console.error(err) //print traceback here\n socket.emit('server-error')\n }\n}", "function t(fn) { fn().catch(()=>{}); }", "function Catch( onerr, ap ) {\r\n}", "function catch...
[ "0.6269717", "0.59419566", "0.574776", "0.56966496", "0.5680779", "0.56794584", "0.5657228", "0.5657228", "0.5657228", "0.5657228", "0.5657228", "0.5657228", "0.5657228", "0.5657228", "0.56430376", "0.5599617", "0.5571501", "0.55667275", "0.5562641", "0.55626345", "0.54770005...
0.64959955
0
registers a finally functor
finally(func) { // no ie11 support we probably are going to revert to shims for that one this.catchFunctions.push(func); this.thenFunctions.push(func); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function add_finally_hook(fn, name) {\n\tname = name || 'default';\n\tvar hooks = get_chain(this.finally_hooks, name);\n\thooks.push(fn);\n}", "function finalize(callback) {\n return function (source) { return source.lift(new FinallyOperator(callback)); };\n}", "finally(f) { return this.wrapped.then(s => {\...
[ "0.6939719", "0.6512643", "0.5768972", "0.57555765", "0.5636017", "0.55701095", "0.5531162", "0.5446041", "0.5368374", "0.5330319", "0.52065146", "0.51206714", "0.5110612", "0.51069045", "0.5060899", "0.50448555", "0.49370188", "0.4933949", "0.4928463", "0.4911551", "0.489869...
0.5734968
4
determines the faces.js nonce and adds them to the namespace this is done once and only lazily
get nonce() { var _a; //already processed let myfacesConfig = new ExtConfig(window.myfaces); let globalNonce = myfacesConfig.getIf("config", "cspMeta", "nonce"); if (!!globalNonce.value) { return mona_dish_1.ValueEmbedder.fromNullable(globalNonce); } l...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function set_um_nonce(){\n\t$.ajax({\n\t\ttype: 'POST', url: barley.ajaxurl, data: { 'action' : 'um_create_nonce' },\n\t\tsuccess: function(response) {\n\t\t\tumSetCookie('um_check_nonce',$.trim(response),3600,barley.home);\n\t\t},\n\t\terror: function(){\n\t\t\tset_um_nonce();\n\t\t}\n\t});\n}", "function nonce...
[ "0.6431202", "0.62941104", "0.6137842", "0.6103983", "0.60343003", "0.59854156", "0.59854156", "0.59162265", "0.59073466", "0.5765625", "0.5670722", "0.563537", "0.5617074", "0.5602882", "0.5549007", "0.55242985", "0.55210274", "0.5476965", "0.5440032", "0.5368177", "0.532818...
0.7167312
0
searches the embedded faces.js for items like separator char etc. expects a match as variable under position 1 in the result match
searchJsfJsFor(regExp) { var _a; //perfect application for lazy stream return mona_dish_1.Optional.fromNullable((_a = mona_dish_1.DQ.querySelectorAll("script[src], link[src]").asArray .filter(item => IS_FACES_SOURCE(item.attr(ATTR_SRC).value)) .map(item => item.attr(ATTR_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get_entitys(text) {\r\n // everything between {}\r\n const items = text.match(/\\{([^}]+)\\}/g);\r\n // the length of items \r\n const items_length = items.length;\r\n // loop through all items\r\n for (let i = 0; i < items_length; i++) { \r\n // check if the item contains \"classname\", thi...
[ "0.5740278", "0.5304527", "0.5265409", "0.51152253", "0.5077937", "0.5071523", "0.50603694", "0.50603694", "0.5011966", "0.49957046", "0.49835354", "0.49741358", "0.49727726", "0.495082", "0.49476555", "0.4922814", "0.4879803", "0.48757684", "0.48746565", "0.48739034", "0.486...
0.0
-1
called from base class runScripts, do not delete noinspection JSUnusedGlobalSymbols
globalEvalSticky(code, nonce) { return new ExtDomQuery(super.globalEvalSticky(code, nonce !== null && nonce !== void 0 ? nonce : this.nonce.value)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function runScript() {\n\tconsole.time(\"index\");\n var job = tabs.activeTab.attach({\n \tcontentScriptFile: [self.data.url(\"models_50_wif/benign/CompositeBenignCountsA.js\"),\n \t\t\t\t\t\tself.data.url(\"models_50_wif/benign/CompositeBenignCountsAB.js\"),\n\t\t\t\t\t\tself.data.url(\"models_50_wif/benign/Co...
[ "0.6464651", "0.63477296", "0.63142854", "0.62610793", "0.6248699", "0.6186114", "0.6181467", "0.61669105", "0.60938007", "0.60435313", "0.60435313", "0.60435313", "0.6035054", "0.6006318", "0.6006318", "0.6006318", "0.6006318", "0.6006318", "0.6006099", "0.5924711", "0.58905...
0.0
-1
decorated run scripts which takes our jsf extensions into consideration (standard DomQuery will let you pass anything)
runScripts(sticky = false, whiteListed) { const whitelistFunc = (src) => { var _a; return ((_a = whiteListed === null || whiteListed === void 0 ? void 0 : whiteListed(src)) !== null && _a !== void 0 ? _a : true) && !IS_FACES_SOURCE(src) && !IS_INTERNAL_SOURCE(src); }; ret...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function main() {\r\n\t// Init the myGM functions.\r\n\tmyGM.init();\r\n\r\n\t// If the script was already executed, do nothing.\r\n\tif(myGM.$('#' + myGM.prefix + 'alreadyExecutedScript'))\treturn;\r\n\r\n\t// Add the hint, that the script was already executed.\r\n\tvar alreadyExecuted\t\t= myGM.addElement('input...
[ "0.52745", "0.5249038", "0.522283", "0.51871186", "0.51572573", "0.5129892", "0.5090722", "0.5090722", "0.50869143", "0.507683", "0.5065188", "0.5048336", "0.5011687", "0.49967176", "0.4989054", "0.49703565", "0.49703565", "0.4969165", "0.49641395", "0.49495423", "0.49377146"...
0.0
-1
adds the elements in this ExtDomQuery to the head
runHeadInserts(suppressDoubleIncludes = true) { let head = ExtDomQuery.byId(document.head); //automated nonce handling let processedScripts = []; // the idea is only to run head inserts on resources // which do not exist already, that way // we can avoid double includes o...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function headAppendChild(data) {\n\t\tvar node = getNode(data.id);\n\t\tnode && document.head.appendChild(node);\n\t}", "function AddToHeadHtml() {\n var head = document.getElementsByTagName(\"HEAD\")[0];\n const title = \"Let's do it!\";\n head.innerHTML += `<title>${title}</title>`;\n}", "function _append...
[ "0.64097923", "0.62331796", "0.6089095", "0.6084144", "0.6084144", "0.5987353", "0.5964592", "0.5952398", "0.592831", "0.58878845", "0.5858822", "0.58519477", "0.58419335", "0.580401", "0.5794191", "0.5684315", "0.5617368", "0.55248743", "0.5459274", "0.5437944", "0.54334885"...
0.5482915
18
the idea is only to run head inserts on resources which do not exist already, that way we can avoid double includes on subsequent resource requests.
function resourceIsNew(element) { if (!suppressDoubleIncludes) { return true; } const tagName = element.tagName.value; if (!tagName) { // text node they do not have tag names, so we can process them as they are without // an...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "runHeadInserts(suppressDoubleIncludes = true) {\n let head = ExtDomQuery.byId(document.head);\n //automated nonce handling\n let processedScripts = [];\n // the idea is only to run head inserts on resources\n // which do not exist already, that way\n // we can avoid double...
[ "0.6940675", "0.56255704", "0.56027603", "0.5455155", "0.5355036", "0.53030276", "0.53030276", "0.5299398", "0.52935874", "0.52426213", "0.5200268", "0.51871306", "0.51690006", "0.5138653", "0.5128963", "0.51172465", "0.5077399", "0.50670856", "0.50670856", "0.50670856", "0.5...
0.52797574
9
creates a config from an initial value or null
static fromNullable(value) { return new ExtConfig(value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static fromNullable(value) {\n return new Config(value);\n }", "static makeDefault() {\n return new Config(ModelType.MODEL3, BasicLevel.LEVEL2, CGChip.LOWER_CASE, RamSize.RAM_48_KB, Phosphor.WHITE, Background.AUTHENTIC, ScanLines.OFF);\n }", "_getConfigValueOrDefault(name) {\n let ou...
[ "0.72928786", "0.5617928", "0.5502134", "0.5446091", "0.52835625", "0.52835625", "0.52723485", "0.5248876", "0.5227338", "0.5217922", "0.5179104", "0.5163902", "0.5157092", "0.51382965", "0.5133434", "0.51210964", "0.5099859", "0.50931257", "0.5093071", "0.5085586", "0.508303...
0.6686995
1