webidl

Wasm access DOM

烂漫一生 提交于 2020-07-17 03:52:12
问题 Is there any way to get read/write access to DOM and/or the WebAPIs(i.e. fullscreen API) without JavaScript? I'm trying to build a basic application in C(C source being actually the result of transpilation from a GC language). The app I'm building will run as Desktop app(it's not meant to run in "real" browsers yet) so I can tweak the environment(i.e. the layout engine) if necessary. 回答1: In the WebAssembly Minimal Viable Product the only way to call into and out of WebAssembly is through

How to associate constants with an interface in C#?

人盡茶涼 提交于 2019-12-01 13:52:58
问题 Some languages let you associate a constant with an interface: A Java example A PhP example The W3C abstract interfaces do the same, for example: // Introduced in DOM Level 2: interface CSSValue { // UnitTypes const unsigned short CSS_INHERIT = 0; const unsigned short CSS_PRIMITIVE_VALUE = 1; const unsigned short CSS_VALUE_LIST = 2; const unsigned short CSS_CUSTOM = 3; attribute DOMString cssText; attribute unsigned short cssValueType; }; I want to define this interface such that it can be