Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warn about unparsed elements #678

Open
chrisvire opened this issue Sep 11, 2024 · 1 comment
Open

Warn about unparsed elements #678

chrisvire opened this issue Sep 11, 2024 · 1 comment
Assignees

Comments

@chrisvire
Copy link
Member

chrisvire commented Sep 11, 2024

One issue with parsing the appdef.xml is that new elements can be introduced and we don't handle them.

We need a way to warn during a convert process that certain elements in the file were not used.

There will be sections that are not relevant to the PWA. So we will need a way to indicate that a section is being ignored.

@chrisvire chrisvire converted this from a draft issue Sep 11, 2024
@AslanRules738
Copy link
Contributor

Perhaps find a way to mark the DOM elements as they are parsed, and then report untouched elements.

We need to change the way it extracts elements, maybe use an abstract function that marks elements as dirty as it access the DOM elements.

There's also the DOM in memory. Make sure you don't accidentally pull it into what you are converting and end up accidentally modifying the DOM

Either

  • Modify current dom
  • Modify shadow dom, copy and then delete converted elements and see if anything is left

Is it efficient to check just the top-level DOM elements?

Assuming conversion uniformly uses getElementsByTagName(attribute), we'll process the DOM with a function that modifies all elements with these attributes, return and equate this, and check for clean elements at the end. Know that we'll have to check if there's a similar solution to query-selector (non getElementsByTagName) functions. Try just searching for document methods (document\.[^g]). There are only two query selectors, one for styles that seems unnecessarily different. Then one with menu-items

@AslanRules738 AslanRules738 self-assigned this Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

2 participants