Adobe-Runtime-Support icon indicating copy to clipboard operation
Adobe-Runtime-Support copied to clipboard

[Windows][macOS] HTMLLoader.isSupported returns true

Open itlancer opened this issue 3 years ago • 3 comments

Problem Description

HTMLLoader.isSupported utility returns true with Windows and macOS but HTMLLoader now legacy and removed. So it should returns false I think. Tested with latest AIR 33.1.1.821 with multiple Windows and macOS devices.

Related issue (no the same): https://github.com/airsdk/Adobe-Runtime-Support/issues/1106

Steps to Reproduce

Launch code below.

Application example with sources attached. htmlloader_issupported_bug.zip

trace(HTMLLoader.isSupported);//returns true

Actual Result: true will be traced.

Expected Result: false will be traced.

Known Workarounds

Just not use HTMLLoader.

itlancer avatar May 02 '22 15:05 itlancer

The same issue with Linux too. Checked with latest AIR 50.0.0.1. HTMLLoader.isSupported returns true. But var html:HTMLLoader = new HTMLLoader(); cause error:

Error: Error #1001: The method StageWebView is not implemented.
	at flash.media::StageWebView/init()
	at flash.media::StageWebView()
	at flash.html::HTMLLoader()

itlancer avatar Sep 19 '22 09:09 itlancer

I take the point on Linux, but am wondering whether we should keep the HTMLLoader.isSupported true even when it's just backed by the native StageWebView..

ajwfrost avatar Sep 21 '22 06:09 ajwfrost

@ajwfrost My opinion - HTMLLoader.isSupported should return false if WebKit (current legacy implementation) not supported anymore. If you have another opinion - ok, just write that such behavior expected.

But for Linux it should return false anyway until any webview implementation (StageWebView too) not supported.

And ideally legacy HTMLLoader should be replaced by something modern. Many discussions about it: https://github.com/airsdk/Adobe-Runtime-Support/issues/1438 https://github.com/airsdk/Adobe-Runtime-Support/issues/1854 https://github.com/airsdk/Adobe-Runtime-Support/issues/1428 https://github.com/airsdk/Adobe-Runtime-Support/issues/223 https://github.com/airsdk/Adobe-Runtime-Support/issues/214 https://github.com/airsdk/Adobe-Runtime-Support/issues/143 https://github.com/airsdk/Adobe-Runtime-Support/issues/1453

itlancer avatar Sep 21 '22 09:09 itlancer

With latest AIR 50.0.1.1 for Linux HTMLLoader.isSupported returns false. Thanks! @ajwfrost, if no plans to make similar changes for Windows/macOS cause it "by design" - I think this issue should be closed.

itlancer avatar Oct 18 '22 19:10 itlancer

Yes, right now we're looking to keep HTMLLoader.isSupported to be true on Windows/macOS, if you need to know whether the functionality is backed by the WebKit or the StageWebView component then you could perhaps also query the runtime version number (33.1.1.758 and later do not have it...)

ajwfrost avatar Oct 19 '22 07:10 ajwfrost