Skip to content

Property 'style' does not exist on type 'Element' #16920

Closed
@itayod

Description

@itayod

TypeScript Version: ~2.3.3

Code

  let floorElements = document.getElementsByClassName("floor");
    for(var i in floorElements) {
      floorElements[i].style.height = AppConstants.FLOOR_SIZE_IN_PX + 'px';
    }

Expected behavior:
Not display an error.
Actual behavior:
I get this error : Property 'style' does not exist on type 'Element'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Working as IntendedThe behavior described is the intended behavior; this is not a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions