MCPcopy Create free account
hub / github.com/breck7/scroll / cellProcess

Function cellProcess

external/.datatables.js:2754–2782  ·  view source on GitHub ↗
(cell)

Source from the content-addressed store, hash-verified

2752
2753 // Read data from a cell and store into the data object
2754 var cellProcess = function (cell) {
2755 if (colIdx === undefined || colIdx === i) {
2756 col = columns[i]
2757 contents = cell.innerHTML.trim()
2758
2759 if (col && col._bAttrSrc) {
2760 var setter = _fnSetObjectDataFn(col.mData._)
2761 setter(d, contents)
2762
2763 attr(col.mData.sort, cell)
2764 attr(col.mData.type, cell)
2765 attr(col.mData.filter, cell)
2766 } else {
2767 // Depending on the `data` option for the columns the data can
2768 // be read to either an object or an array.
2769 if (objectRead) {
2770 if (!col._setter) {
2771 // Cache the setter function
2772 col._setter = _fnSetObjectDataFn(col.mData)
2773 }
2774 col._setter(d, contents)
2775 } else {
2776 d[i] = contents
2777 }
2778 }
2779 }
2780
2781 i++
2782 }
2783
2784 if (td) {
2785 // `tr` element was passed in

Callers 1

_fnGetRowElementsFunction · 0.85

Calls 2

attrFunction · 0.85
trimMethod · 0.80

Tested by

no test coverage detected