Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var editorView = atom.views.getView(editor);
if (!editorView.blameView) {
var remoteUrl = projectBlamer.repo.getOriginURL(filePath);
var remoteRevision;
try {
remoteRevision = RemoteRevision.create(remoteUrl);
} catch (e) {
// the only exception possible occurs when the template string is invalid
// TODO refactor this to not throw an exception
}
// insert the BlameListView after the gutter div
var mountPoint = $('<div>', {'class': 'git-blame-mount'});
$(editorView.rootElement).find('.gutter').after(mountPoint);
editorView.blameView = React.renderComponent(new BlameListView({
projectBlamer: projectBlamer,
remoteRevision: remoteRevision,
editorView: editorView
}), mountPoint[0]);
} else {
editorView.blameView.toggle();
}
}
</div>
ASDF.prototype.createdCallback = function(first_argument) {
if (!this.shadow) {
this.shadow = this.createShadowRoot();
}
this.styles = document.createElement('style');
this.styles.textContent = ".floobits {color: red}";
this.shadow.appendChild(this.styles.cloneNode(true));
this.styles.setAttribute('context', 'floobits-asdf');
this.root = document.createElement('div');
this.root.classList.add('floobits');
this.shadow.appendChild(this.root);
this.component = React.renderComponent(Component(), this.root);
};
Proto.attachedCallback = function () {
this.reactNode = React.renderComponent(this.component, this);
};