当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript DOM.createElement方法代码示例

本文整理汇总了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);
    });
开发者ID:eriklieben,项目名称:old-aurelia-materialize-css-before-rc1,代码行数:7,代码来源:scrollspyElement.spec.ts

示例3: beforeEach

    beforeEach(() => {
        container = new Container();
        templatingEngine = container.get(TemplatingEngine);

        sut = templatingEngine.createViewModelForUnitTest(ButtonElement);
        sut.element = DOM.createElement("a");
    });
开发者ID:eriklieben,项目名称:old-aurelia-materialize-css-before-rc1,代码行数:7,代码来源:buttonElement.spec.ts

示例4: beforeEach

    beforeEach(() => {
        container = new Container();
        container.registerInstance(Element, DOM.createElement("div"));
        templatingEngine = container.get(TemplatingEngine);
        sut = templatingEngine.createViewModelForUnitTest(SliderElement);

        options = {
            full_width: false,
        };

    });
开发者ID:eriklieben,项目名称:old-aurelia-materialize-css-before-rc1,代码行数:11,代码来源:sliderElement.spec.ts

示例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");
    });
开发者ID:eriklieben,项目名称:old-aurelia-materialize-css-before-rc1,代码行数:12,代码来源:sliderElement.spec.ts

示例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");
    }
开发者ID:eriklieben,项目名称:aurelia-materialize-css,代码行数:12,代码来源:breadcrumbsAttribute.ts

示例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;
 };
开发者ID:HIRANO-Satoshi,项目名称:dialog,代码行数:13,代码来源:dialog-renderer.spec.ts

示例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,
        };
    });
开发者ID:eriklieben,项目名称:old-aurelia-materialize-css-before-rc1,代码行数:13,代码来源:pushpinElement.spec.ts


注:本文中的aurelia-pal.DOM.createElement方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。