Skip to content

Fix code block formatting in README and question - #19

Open
brettz9 wants to merge 1 commit into
dawn-gpu:mainfrom
brettz9:patch-1
Open

brettz9 wants to merge 1 commit into
dawn-gpu:mainfrom
brettz9:patch-1

Conversation

@brettz9

@brettz9 brettz9 commented Sep 25, 2026

Copy link
Copy Markdown

Updated code block formatting in README for clarity.

My real purpose is to ask if you could add Symbol.toStringTag for each of the globals, e.g., GPUCompilationInfo and GPUCompilationMessage, e.g.,

  Object.defineProperty(
      globals.GPUCompilationMessage.prototype, Symbol.toStringTag, {
          get () {
              return 'GPUCompilationMessage';
          }
      }
  );
  Object.defineProperty(
      globals.GPUCompilationInfo.prototype, Symbol.toStringTag, {
          get () {
              return 'GPUCompilationInfo';
          }
      }
  );

For some reason, the string tag is defined only on the constructor, e.g., globals.GPUCompilationMessage, not on its prototype, so objects don't get that.

I don't know if this is something that can be fixed in C source, or whether symbols need to be added in JavaScript.

My interest is to allow structured cloning of these objects, and that requires detection of their type.

Thanks!

Updated code block formatting in README for clarity.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant