tomlau10 / gcc-make-run

Compile-run C/C++ source code and execute Makefile in Atom.
https://atom.io/packages/gcc-make-run
MIT License
24 stars 10 forks source link

HTMLDocument.registerElement is deprecated. #62

Closed Firemanchief52 closed 5 months ago

Firemanchief52 commented 2 years ago

Use customElements.define instead of document.registerElement see https://javascript.info/custom-elements

HTMLDocument.registerElement (file:///Applications/Atom%20Nightly.app/Contents/Resources/app.asar/static/index.js:160:12)
registerElement (/Users/firemanchief52/.atom/packages/gcc-make-run/node_modules/space-pen/lib/space-pen.js:66:88)
Builder.openTag (/Users/firemanchief52/.atom/packages/gcc-make-run/node_modules/space-pen/lib/space-pen.js:297:27)
Builder.tag (/Users/firemanchief52/.atom/packages/gcc-make-run/node_modules/space-pen/lib/space-pen.js:274:12)
Function.div (/Users/firemanchief52/.atom/packages/gcc-make-run/node_modules/space-pen/lib/space-pen.js:83:49)
Function.content (/Users/firemanchief52/.atom/packages/gcc-make-run/lib/gcc-make-run-view.coffee:25:19)
aqude commented 1 year ago

fix ?

SouravShit commented 5 months ago

I have This error while running my C++ code in Pulsar Editor. Give me some suggestions on this topic.

SouravShit commented 5 months ago

HTMLDocument.registerElement (file:///Applications/Atom%20Nightly.app/Contents/Resources/app.asar/static/index.js:160:12) registerElement (/Users/firemanchief52/.atom/packages/gcc-make-run/node_modules/space-pen/lib/space-pen.js:66:88) Builder.openTag (/Users/firemanchief52/.atom/packages/gcc-make-run/node_modules/space-pen/lib/space-pen.js:297:27) Builder.tag (/Users/firemanchief52/.atom/packages/gcc-make-run/node_modules/space-pen/lib/space-pen.js:274:12) Function.div (/Users/firemanchief52/.atom/packages/gcc-make-run/node_modules/space-pen/lib/space-pen.js:83:49) Function.content (/Users/firemanchief52/.atom/packages/gcc-make-run/lib/gcc-make-run-view.coffee:25:19)

Give me some suggetions how to tackle this problem

1 issue when atom detects C++14

tomlau10 commented 5 months ago

I noticed your issue notification, and it reminded me about this repository, which I had long forgotten. Unfortunately, I'm not familiar with the UI framework code and won't be able to provide much assistance. I switched to VS Code a while back, and Atom editor has been discontinued for over a year.

Regarding Pulsar Editor, I've never heard of it before. You mentioned that it can run Atom extensions? Perhaps I can explore it in my free time, but even then, I can't guarantee that I'll find solutions. Additionally, it will take some time to figure out how to publish to Pulsar Editor's package registry.

tomlau10 commented 5 months ago

I just installed Pulsar Editor with this extension, and it seems that this is a deprecation warning only, but not error. This warning is originated from the atom-space-pen-views library, which is used to construct the Run Option View of the extension. And those codes were copied from another similar extension when I first create this plugin.

I have no idea how to fix it in the mean time. 😕

tomlau10 commented 5 months ago

After conducting some research, it has been determined that document.registerElement was deprecated and removed from Chromium long ago. The Atom maintainers intentionally reintroduced this deprecated function to prevent potential issues with many packages and explicitly included the deprecation warning message.

These changes associated with document.registerElement can be observed in this commit and the Pulsar v1.104.0 Changelog. Therefore, there is no immediate need to fix this issue as long as it continues to work correctly. (And I don't know how to fix it...)

@rockAlfpha