本文整理汇总了TypeScript中aurelia-pal.DOM.createElement方法的典型用法代码示例。如果您正苦于以下问题:TypeScript DOM.createElement方法的具体用法?TypeScript DOM.createElement怎么用?TypeScript DOM.createElement使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类aurelia-pal.DOM
的用法示例。
在下文中一共展示了DOM.createElement方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: beforeEach
beforeEach(() => {
container = new Container();
container.registerInstance(Element, DOM.createElement("div"));
templatingEngine = container.get(TemplatingEngine);
sut = templatingEngine.createViewModelForUnitTest(DropdownDividerAttribute);
});
开发者ID:eriklieben,项目名称:old-aurelia-materialize-css-before-rc1,代码行数:7,代码来源:dropdownDividerAttribute.spec.ts
示例2: beforeEach
beforeEach(() => {
container = new Container();
container.registerInstance(Element, DOM.createElement("div"));
templatingEngine = container.get(TemplatingEngine);
sut = templatingEngine.createViewModelForUnitTest(ScrollSpyElement);
});
示例3: beforeEach
beforeEach(() => {
container = new Container();
templatingEngine = container.get(TemplatingEngine);
sut = templatingEngine.createViewModelForUnitTest(ButtonElement);
sut.element = DOM.createElement("a");
});
示例4: beforeEach
beforeEach(() => {
container = new Container();
container.registerInstance(Element, DOM.createElement("div"));
templatingEngine = container.get(TemplatingEngine);
sut = templatingEngine.createViewModelForUnitTest(SliderElement);
options = {
full_width: false,
};
});
示例5: it
it("must remove the css class 'fullscreen' from the slider element on detached", () => {
// arrange
sut.sliderDiv = DOM.createElement("div");
sut.sliderDiv.classList.add("fullscreen");
// act
sut.detached();
// assert
expect(sut.sliderDiv.classList).not.toContain("fullscreen");
});
示例6: attached
public attached() {
let colWrapper = DOM.createElement("div");
colWrapper.classList.add("col", "s12");
while (this.element.hasChildNodes()) {
colWrapper.appendChild(this.element.firstChild);
}
this.element.appendChild(colWrapper);
this.element.classList.add("nav-wrapper");
}
示例7: return
return () => {
if (typeof durationPropertyName !== 'undefined') { return durationPropertyName; }
const propertyNames = ['oTransitionDuration', 'webkitTransitionDuration', 'transitionDuration']; // order matters
const fakeElement = DOM.createElement('fakeelement') as HTMLElement;
let propertyName: string | undefined;
// tslint:disable-next-line:no-conditional-assignment
while (propertyName = propertyNames.pop()) {
if (propertyName in fakeElement.style) {
return durationPropertyName = propertyName || null;
}
}
return durationPropertyName = null;
};
示例8: beforeEach
beforeEach(() => {
container = new Container();
container.registerInstance(Element, DOM.createElement("div"));
templatingEngine = container.get(TemplatingEngine);
sut = templatingEngine.createViewModelForUnitTest(PushpinElement);
defaultOptions = {
bottom: Infinity,
offset: 0,
top: 0,
};
});