Skip to content
This repository has been archived by the owner on Aug 4, 2020. It is now read-only.

modularize codebase #17

Closed
pkra opened this issue Sep 13, 2018 · 2 comments
Closed

modularize codebase #17

pkra opened this issue Sep 13, 2018 · 2 comments
Labels
enhancement/feature New feature or request
Milestone

Comments

@pkra
Copy link
Member

pkra commented Sep 13, 2018

As per F2F with @zorkow, first order of business is to modularize the current code base.

@pkra pkra added the enhancement/feature New feature or request label Sep 13, 2018
@pkra
Copy link
Member Author

pkra commented Sep 28, 2018

Here's a first step towards this: we split chromify.js into three modules:

  • helpers.mjs exports makeId
  • rewriteNode.mjs: exports rewriteNode (imports makId, also has its specific helpers)
  • navigator.mjs: exports attachNavigator (imports makId, also has its specific helpers)
  • main.mjs which is just
import {rewriteNode} from '/rewriteNode.mjs';
import {attachNavigator}  from '/navigator.mjs';

document.querySelectorAll('[data-semantic-structure]').forEach((node, index)=>{
    rewriteNode(node, index);
    attachNavigator(node, index);
})

And adapt index.html to load main.mjs as a module.

@pkra
Copy link
Member Author

pkra commented Sep 28, 2018

Afterwards we can continue thinking about eliminating makeId and fixing aria-owns calculation.

@pkra pkra closed this as completed in #21 Oct 1, 2018
@pkra pkra added this to the v2 milestone Jan 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement/feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant