Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

ComObject Member-access enumeration #19854

Copy link
Copy link
@iRon7

Description

@iRon7
Issue body actions

Summary of the new feature / enhancement

Coming from Stackoverflow question: Extract text from html with powershell
And probably ties into #4553 (which I simply don't fully understand)

Just like Member-Access Enumeration for native .Net and PowerShell objects, I would expect to be able to enumerate ComObject members (System.MarshalByRefObject?) in a similar way:

$String = '<div>Some text</div>'
$Unicode = [System.Text.Encoding]::Unicode.GetBytes($String)
$Html = New-Object -Com 'HTMLFile'
$Html.write($Unicode)
$Html.getElementsByTagName('div').innerText

Expected

Some Text

Actual

No output

Workarrounds

@($Html.getElementsByTagName('div')).innerText
$Html.getElementsByTagName('div') |% { $_.innerText }
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productKeepOpenThe bot will ignore these and not auto-closeThe bot will ignore these and not auto-closeWG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtime

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.