[Pkg-javascript-commits] [ltx] 448/469: add createElement jsdoc
Jonas Smedegaard
dr at jones.dk
Wed Aug 31 13:03:37 UTC 2016
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository ltx.
commit 56365a09d296cef246474b13596a05379addaf19
Author: Sonny Piers <sonny at fastmail.net>
Date: Mon Jun 6 12:11:46 2016 +0200
add createElement jsdoc
---
lib/createElement.js | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/lib/createElement.js b/lib/createElement.js
index f9e321c..72b54f5 100644
--- a/lib/createElement.js
+++ b/lib/createElement.js
@@ -1,9 +1,15 @@
'use strict'
-// JSX compatible
-
var Element = require('./Element')
+/**
+ * JSX compatible API, use this function as pragma
+ * https://facebook.github.io/jsx/
+ *
+ * @param {string} name name of the element
+ * @param {object} attrs object of attribute key/value pairs
+ * @return {Element} Element
+ */
module.exports = function createElement (name, attrs /*, child1, child2, ...*/) {
var el = new Element(name, attrs)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/ltx.git
More information about the Pkg-javascript-commits
mailing list