emscripten-core/emscripten

WebIDL + JSImplementation + DOMString

Open

#10,705 opened on Mar 17, 2020

View on GitHub
 (2 comments) (0 reactions) (0 assignees)C++ (3,519 forks)batch import
good first bughelp wanted

Repository metrics

Stars
 (27,361 stars)
PR merge metrics
 (Avg merge 19d 10h) (147 merged PRs in 30d)

Description

The following IDL does not generate correct bindings:

interface CTest
{
  void CTest();
  void OnStartElement([Const] DOMString pszName, [Const] DOMString[] papszAttrs);
};

[JSImplementation = "CTest"]
interface CTestJS {
  void CTestJS();
  void OnStartElement([Const] DOMString pszName, [Const] DOMString[] papszAttrs);
};

Specifically both pszName + papszAttrs end up in the JS code as pointers.

Contributor guide