Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// a CustomEvent here.
const fetchErrorEvent = e as CustomEvent;
const error = fetchErrorEvent.detail.error;
const loadingWhat = fetchErrorEvent.detail.loading;
if (fetchErrorEvent.detail.error.name !== 'AbortError') {
// We can ignore AbortError since they fire anytime an AbortController was canceled.
// Chrome and Firefox report a DOMException in this case:
// https://developer.mozilla.org/en-US/docs/Web/API/DOMException
console.error(error);
errorMessage(`Unexpected error loading ${loadingWhat}: ${error.message}`, 5000);
}
this.finishedTask();
}
}
define('gold-scaffold-sk', GoldScaffoldSk);
// - commit 4 has incorrect data
// In this case, we need to make sure we can create a blamelist that starts on the first
// real commit after commit 2. Therefore, we include commit 2 in the list, which GitHub
// and googlesource will automatically elide when we ask for a range of history (in
// blamelist-panel-sk). If there were no preceding missing digests, this will equal x-1.
lastNonMissingIndex = i;
break;
}
}
const blamelist = this._commits.slice(lastNonMissingIndex, x + 1);
blamelist.reverse();
return blamelist;
}
}
define('dots-sk', DotsSk);
<div class="triggering-spinner">
</div>
<button>Queue Task
</button>
<button id="view_history">View runs history</button>
`;
define('chromium-builds-sk', class extends ElementSk {
constructor() {
super(template);
this._triggeringTask = false;
this._moreThanThreeActiveTasks = moreThanThreeActiveTasksChecker();
}
connectedCallback() {
super.connectedCallback();
this._render();
// Load LKGR data.
this._chromiumRevChanged();
this._skiaRevChanged();
}
_chromiumRevChanged() {
this._suggestionSelected = -1;
this._render();
}
_suggestionClick(e: Event): void {
const item = e.target as HTMLElement;
if (item.tagName !== 'LI') {
return;
}
const index = Array.from(item.parentNode!.children).indexOf(item);
this._suggestionSelected = index;
this._commit();
}
}
define('suggest-input-sk', SuggestInputSk);
this.pauseTime = 0;
this._render();
}
private togglePlaying() {
if (this.playing) {
this.pauseTime = this.time;
} else {
this.time = this.pauseTime;
}
this.playing = !this.playing;
this._render();
}
}
define('uniform-time-sk', UniformTimeSk);
this.selectedCorpus = corpus;
this._sendCorpusSelected();
}
}
private _sendCorpusSelected() {
this.dispatchEvent(
new CustomEvent('corpus-selected', {
detail: this._selectedCorpus!,
bubbles: true,
}),
);
}
};
define('corpus-selector-sk', CorpusSelectorSk);
return false;
}
get uniform(): Uniform {
return this._uniform;
}
set uniform(val: Uniform) {
if (val.columns !== 3 || val.rows !== 1) {
throw new Error('The imageresolution uniform must be a float3.');
}
this._uniform = val;
}
}
define('uniform-imageresolution-sk', UniformImageresolutionSk);
});
});
observer.observe(this, { childList: true });
}
/** @prop appTitle {string} Reflects the app_title attribute for ease of use. */
get appTitle(): string { return this.getAttribute('app_title') || ''; }
set appTitle(val: string) { this.setAttribute('app_title', val); }
disconnectedCallback(): void {
super.disconnectedCallback();
}
}
define('tree-scaffold-sk', TreeScaffoldSk);
/**
* @prop {string} textPrefix - Optional prefix to put before the input box.
* Mirrors the attribute.
*/
get textPrefix(): string {
return this.getAttribute('textPrefix') || '';
}
set textPrefix(val: string) {
this.setAttribute('type', val);
this._render();
}
}
define('input-sk', InputSk);
},
body: JSON.stringify(params),
})
.then(() => this._gotoRunsHistory())
.catch((e) => {
this._triggeringTask = false;
errorMessage(e);
});
}
_gotoRunsHistory(): void {
window.location.href = '/chromium_analysis_runs/';
}
}
define('chromium-analysis-sk', ChromiumAnalysisSk);