コード例 #1
0
ファイル: Element.spec.js プロジェクト: MD-luffy/handsontable
    it('should return true for contentEditable elements', () => {
      var div = document.createElement('div');

      div.contentEditable = 'true';

      expect(isInput(div)).toBe(true);
    });
コード例 #2
0
ファイル: Element.spec.js プロジェクト: MD-luffy/handsontable
 it('should return true for inputs, selects, and textareas', () => {
   expect(isInput(document.createElement('input'))).toBe(true);
   expect(isInput(document.createElement('select'))).toBe(true);
   expect(isInput(document.createElement('textarea'))).toBe(true);
 });