本文整理汇总了TypeScript中vs/base/browser/fastDomNode.FastDomNode.removeAttribute方法的典型用法代码示例。如果您正苦于以下问题:TypeScript FastDomNode.removeAttribute方法的具体用法?TypeScript FastDomNode.removeAttribute怎么用?TypeScript FastDomNode.removeAttribute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vs/base/browser/fastDomNode.FastDomNode
的用法示例。
在下文中一共展示了FastDomNode.removeAttribute方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: setAriaActiveDescendant
public setAriaActiveDescendant(id: string): void {
if (id) {
this.textArea.setAttribute('role', 'combobox');
if (this.textArea.getAttribute('aria-activedescendant') !== id) {
this.textArea.setAttribute('aria-haspopup', 'true');
this.textArea.setAttribute('aria-activedescendant', id);
}
} else {
this.textArea.setAttribute('role', 'textbox');
this.textArea.removeAttribute('aria-activedescendant');
this.textArea.removeAttribute('aria-haspopup');
}
}
示例2: render
public render(ctx: RestrictedRenderingContext): void {
if (!this._renderData) {
// This widget should be invisible
if (this._isVisible) {
this.domNode.removeAttribute('monaco-visible-content-widget');
this._isVisible = false;
this.domNode.setVisibility('hidden');
}
return;
}
// This widget should be visible
if (this.allowEditorOverflow) {
this.domNode.setTop(this._renderData.top);
this.domNode.setLeft(this._renderData.left);
} else {
this.domNode.setTop(this._renderData.top + ctx.scrollTop - ctx.bigNumbersDelta);
this.domNode.setLeft(this._renderData.left);
}
if (!this._isVisible) {
this.domNode.setVisibility('inherit');
this.domNode.setAttribute('monaco-visible-content-widget', 'true');
this._isVisible = true;
}
}
示例3: render
public render(ctx: RestrictedRenderingContext): void {
let data = this._renderData;
let keys = Object.keys(this._widgets);
for (let i = 0, len = keys.length; i < len; i++) {
const widgetId = keys[i];
const widget = this._widgets[widgetId];
const domNode = widget.domNode;
if (data.hasOwnProperty(widgetId)) {
if (widget.allowEditorOverflow) {
domNode.setTop(data[widgetId].top);
domNode.setLeft(data[widgetId].left);
} else {
domNode.setTop(data[widgetId].top + ctx.scrollTop - ctx.bigNumbersDelta);
domNode.setLeft(data[widgetId].left);
}
if (!widget.isVisible) {
domNode.setVisibility('inherit');
domNode.setAttribute('monaco-visible-content-widget', 'true');
widget.isVisible = true;
}
} else {
if (widget.isVisible) {
domNode.removeAttribute('monaco-visible-content-widget');
widget.isVisible = false;
domNode.setVisibility('hidden');
}
}
}
}
示例4: removeWidget
public removeWidget(widget: IContentWidget): void {
const widgetId = widget.getId();
if (this._widgets.hasOwnProperty(widgetId)) {
const myWidget = this._widgets[widgetId];
delete this._widgets[widgetId];
const domNode = myWidget.domNode.domNode;
domNode.parentNode.removeChild(domNode);
domNode.removeAttribute('monaco-visible-content-widget');
this.setShouldRender();
}
}