natpryce
03/11/2023, 9:33 AMexpect
declarations because the DOM API is mapped to interfaces in the JVM platform and classes in the Javascript platform. The DOM objects are provided by factories in both platforms, so my code only needs to use the DOM objects, not instantiate the classes nor implement the interfaces. What should the expect declaration be?turansky
03/11/2023, 3:02 PM// common
expect class Color
// JS
@Suppress("ACTUAL_WITHOUT_EXPECT")
actual typealias Color = csstype.Color
csstype.Color
- external interfacenatpryce
03/11/2023, 4:46 PMpublic interface Element extends Node
while on the JS platform it is declared as public abstract external class Element
.expect
function that loads a document, implemented by platform-specific actual
code in the JVM and JS modules.turansky
03/11/2023, 4:53 PMSuppress
natpryce
03/11/2023, 4:55 PMturansky
03/11/2023, 4:56 PMnatpryce
03/11/2023, 4:56 PMturansky
03/11/2023, 4:58 PMnatpryce
03/11/2023, 5:04 PMturansky
03/12/2023, 10:26 PM