Skip to content

Commit 8cc040c

Browse files
committed
Initial commit
0 parents  commit 8cc040c

File tree

135 files changed

+8646
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+8646
-0
lines changed

.eslintrc.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"parserOptions": {
3+
"ecmaVersion": 5
4+
},
5+
"extends": "eslint:recommended",
6+
"env": {
7+
"commonjs": true,
8+
"browser": true
9+
},
10+
"rules": {
11+
"strict": [2, "global"],
12+
"block-scoped-var": 2,
13+
"consistent-return": 2,
14+
"eqeqeq": [2, "smart"],
15+
"guard-for-in": 2,
16+
"no-caller": 2,
17+
"no-extend-native": 2,
18+
"no-loop-func": 2,
19+
"no-new": 2,
20+
"no-param-reassign": 2,
21+
"no-return-assign": 2,
22+
"no-unused-expressions": 2,
23+
"no-use-before-define": 2,
24+
"radix": [2, "always"],
25+
"indent": [2, 2],
26+
"quotes": [2, "double"],
27+
"semi": [2, "always"]
28+
}
29+
}

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Dependencies
2+
.psci_modules
3+
bower_components
4+
node_modules
5+
6+
# Generated files
7+
.psci
8+
output

.travis.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
language: node_js
2+
dist: trusty
3+
sudo: required
4+
node_js: stable
5+
install:
6+
- npm install -g bower
7+
- npm install
8+
- bower install
9+
script:
10+
- npm run -s build
11+
after_success:
12+
- >-
13+
test $TRAVIS_TAG &&
14+
echo $GITHUB_TOKEN | pulp login &&
15+
echo y | pulp publish --no-push

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2018 PureScript
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# purescript-web-html
2+
3+
[![Latest release](http://img.shields.io/github/release/purescript-web/purescript-web-html.svg)](https://github.com/purescript-web/purescript-web-html/releases)
4+
[![Build status](https://travis-ci.org/purescript-web/purescript-web-html.svg?branch=master)](https://travis-ci.org/purescript-web/purescript-web-html)
5+
6+
Type definitions and low level interface implementations for the W3C HTML5 API.
7+
8+
## Installation
9+
10+
```
11+
bower install purescript-web-html
12+
```
13+
14+
## Documentation
15+
16+
Module documentation is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-web-html).

bower.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "purescript-web-html",
3+
"homepage": "https://github.com/purescript-web/purescript-web-html",
4+
"license": "MIT",
5+
"repository": {
6+
"type": "git",
7+
"url": "git://github.com/purescript-web/purescript-web-html.git"
8+
},
9+
"ignore": [
10+
"**/.*",
11+
"bower_components",
12+
"node_modules",
13+
"output",
14+
"bower.json",
15+
"package.json"
16+
],
17+
"dependencies": {
18+
"purescript-js-date": "#compiler/0.12",
19+
"purescript-web-dom": "#compiler/0.12",
20+
"purescript-web-file": "#compiler/0.12",
21+
"purescript-web-storage": "purescript-web/purescript-web-storage#compiler/0.12"
22+
}
23+
}

package.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"private": true,
3+
"scripts": {
4+
"clean": "rimraf output && rimraf .pulp-cache",
5+
"build": "eslint src && pulp build -- --censor-lib --strict"
6+
},
7+
"devDependencies": {
8+
"eslint": "^4.19.1",
9+
"pulp": "^12.2.0",
10+
"purescript-psa": "^0.6.0",
11+
"purescript": "^0.11.7",
12+
"rimraf": "^2.6.2"
13+
}
14+
}

src/Web/HTML/HTMLAnchorElement.js

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
"use strict";
2+
3+
exports.target = function (a) {
4+
return function () {
5+
return a.target;
6+
};
7+
};
8+
9+
exports.setTarget = function (target) {
10+
return function (a) {
11+
return function () {
12+
a.target = target;
13+
};
14+
};
15+
};
16+
17+
// ----------------------------------------------------------------------------
18+
19+
exports.download = function (a) {
20+
return function () {
21+
return a.download;
22+
};
23+
};
24+
25+
exports.setDownload = function (download) {
26+
return function (a) {
27+
return function () {
28+
a.download = download;
29+
};
30+
};
31+
};
32+
33+
// ----------------------------------------------------------------------------
34+
35+
exports.rel = function (a) {
36+
return function () {
37+
return a.rel;
38+
};
39+
};
40+
41+
exports.setRel = function (rel) {
42+
return function (a) {
43+
return function () {
44+
a.rel = rel;
45+
};
46+
};
47+
};
48+
49+
// ----------------------------------------------------------------------------
50+
51+
exports.rev = function (a) {
52+
return function () {
53+
return a.rev;
54+
};
55+
};
56+
57+
exports.setRev = function (rev) {
58+
return function (a) {
59+
return function () {
60+
a.rev = rev;
61+
};
62+
};
63+
};
64+
65+
// ----------------------------------------------------------------------------
66+
67+
exports.relList = function (a) {
68+
return function () {
69+
return a.relList;
70+
};
71+
};
72+
73+
// ----------------------------------------------------------------------------
74+
75+
exports.hreflang = function (a) {
76+
return function () {
77+
return a.hreflang;
78+
};
79+
};
80+
81+
exports.setHreflang = function (hreflang) {
82+
return function (a) {
83+
return function () {
84+
a.hreflang = hreflang;
85+
};
86+
};
87+
};
88+
89+
// ----------------------------------------------------------------------------
90+
91+
exports.type_ = function (a) {
92+
return function () {
93+
return a.type;
94+
};
95+
};
96+
97+
exports.setType = function (type) {
98+
return function (a) {
99+
return function () {
100+
a.type = type;
101+
};
102+
};
103+
};
104+
105+
// ----------------------------------------------------------------------------
106+
107+
exports.text = function (a) {
108+
return function () {
109+
return a.text;
110+
};
111+
};
112+
113+
exports.setText = function (text) {
114+
return function (a) {
115+
return function () {
116+
a.text = text;
117+
};
118+
};
119+
};

src/Web/HTML/HTMLAnchorElement.purs

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
module Web.HTML.HTMLAnchorElement where
2+
3+
import Effect (Effect)
4+
import Foreign (Foreign, F, unsafeReadTagged)
5+
import Prelude (Unit)
6+
import Unsafe.Coerce (unsafeCoerce)
7+
import Web.DOM.DOMTokenList (DOMTokenList)
8+
import Web.HTML.HTMLElement (HTMLElement)
9+
10+
foreign import data HTMLAnchorElement :: Type
11+
12+
toHTMLElement :: HTMLAnchorElement -> HTMLElement
13+
toHTMLElement = unsafeCoerce
14+
15+
read :: Foreign -> F HTMLAnchorElement
16+
read = unsafeReadTagged "HTMLAnchorElement"
17+
18+
foreign import target :: HTMLAnchorElement -> Effect String
19+
foreign import setTarget :: String -> HTMLAnchorElement -> Effect Unit
20+
21+
foreign import download :: HTMLAnchorElement -> Effect String
22+
foreign import setDownload :: String -> HTMLAnchorElement -> Effect Unit
23+
24+
foreign import rel :: HTMLAnchorElement -> Effect String
25+
foreign import setRel :: String -> HTMLAnchorElement -> Effect Unit
26+
27+
foreign import rev :: HTMLAnchorElement -> Effect String
28+
foreign import setRev :: String -> HTMLAnchorElement -> Effect Unit
29+
30+
foreign import relList :: HTMLAnchorElement -> Effect DOMTokenList
31+
32+
foreign import hreflang :: HTMLAnchorElement -> Effect String
33+
foreign import setHreflang :: String -> HTMLAnchorElement -> Effect Unit
34+
35+
foreign import type_ :: HTMLAnchorElement -> Effect String
36+
foreign import setType :: String -> HTMLAnchorElement -> Effect Unit
37+
38+
foreign import text :: HTMLAnchorElement -> Effect String
39+
foreign import setText :: String -> HTMLAnchorElement -> Effect Unit

0 commit comments

Comments
 (0)