This behavior is something I just came across while utilizing mshtml.HTMLDocumentClass.
Prior to Preview 2, fields that were seen as having values of False were not considered the same as [BDNull]::Value.
Since Preview 2 through the current 5, these fields are now seen as equivalent to [DBNull]
Attached a sample ChromeBookmark export file I used for these.
PowerShell 5 Example With Results
$BK = New-Object -Com "HTMLFile"
$BK.IHTMLDocument2_write($(Get-Content .\ChromeBKSample.txt -Raw))
$BKL = $BK.links[0]
($BKL.attributes("disabled")).nodeValue
False
($BKL.attributes("disabled")).nodeValue -eq [DBNull]::Value
False
PowerShell 7 Preview 5 Example With Results (And alterations needed to make it work with PSH6+)
Add-Type -Path "C:\Program Files (x86)\Microsoft.NET\Primary Interop Assemblies\Microsoft.mshtml.dll"
$BK = New-Object mshtml.HTMLDocumentClass
$BK.IHTMLDocument2_write($(Get-Content .\ChromeBKSample.txt -Raw))
$BKL = $BK.links.item(0)
($BKL.attributes.item("disabled")).nodeValue
False
# This used to return "False", but since Preview 2 now returns True, despite also showing it as having a value of False:
($BKL.attributes.item("disabled")).nodeValue -eq [DBNull]::Value
True
ChromeBKSample.txt
Possibly related to changes from other issues?: #9561, #9794, #10404
This behavior is something I just came across while utilizing mshtml.HTMLDocumentClass.
Prior to Preview 2, fields that were seen as having values of False were not considered the same as [BDNull]::Value.
Since Preview 2 through the current 5, these fields are now seen as equivalent to [DBNull]
Attached a sample ChromeBookmark export file I used for these.
PowerShell 5 Example With Results
PowerShell 7 Preview 5 Example With Results (And alterations needed to make it work with PSH6+)
ChromeBKSample.txt
Possibly related to changes from other issues?: #9561, #9794, #10404