aria-menubar.js 622 B

123456789101112131415161718192021222324
  1. 'use strict';
  2. exports.__esModule = true;
  3. var _ariaMenuitem = require('./aria-menuitem');
  4. var _ariaMenuitem2 = _interopRequireDefault(_ariaMenuitem);
  5. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  6. var Menu = function Menu(domNode) {
  7. this.domNode = domNode;
  8. this.init();
  9. };
  10. Menu.prototype.init = function () {
  11. var menuChildren = this.domNode.childNodes;
  12. [].filter.call(menuChildren, function (child) {
  13. return child.nodeType === 1;
  14. }).forEach(function (child) {
  15. new _ariaMenuitem2.default(child); // eslint-disable-line
  16. });
  17. };
  18. exports.default = Menu;