`val xmlns : Js.js_string Js.t`

Types

`type error_code =`

1. `| WRONG_TYPE_ERR`
2. `| INVALID_VALUE_ERR`
3. `| MATRIX_NOT_INVERTABLE`

- deprecated

  Removed in SVG 2.

`class type svg_error = object ... end`
`exception SVGError of svg_error`

- deprecated

  Removed in SVG 2.

`type lengthUnitType =`

1. `| LENGTHTYPE_UNKNOWN`
2. `| LENGTHTYPE_NUMBER`
3. `| LENGTHTYPE_PERCENTAGE`
4. `| LENGTHTYPE_EMS`
5. `| LENGTHTYPE_EXS`
6. `| LENGTHTYPE_PX`
7. `| LENGTHTYPE_CM`
8. `| LENGTHTYPE_MM`
9. `| LENGTHTYPE_IN`
10. `| LENGTHTYPE_PT`
11. `| LENGTHTYPE_PC`

`type angleUnitType =`

1. `| ANGLETYPE_UNKNOWN`
2. `| ANGLETYPE_UNSPECIFIED`
3. `| ANGLETYPE_DEG`
4. `| ANGLETYPE_RAD`
5. `| ANGLETYPE_GRAD`

`type colorType =`

1. `| COLORTYPE_UNKNOWN`
2. `| COLORTYPE_RGBCOLOR`
3. `| COLORTYPE_RGBCOLOR_ICCCOLOR`
4. `| COLORTYPE_CURRENTCOLOR`

`type alignmentType =`

1. `| PRESERVEASPECTRATIO_UNKNOWN`
2. `| PRESERVEASPECTRATIO_NONE`
3. `| PRESERVEASPECTRATIO_XMINYMIN`
4. `| PRESERVEASPECTRATIO_XMIDYMIN`
5. `| PRESERVEASPECTRATIO_XMAXYMIN`
6. `| PRESERVEASPECTRATIO_XMINYMID`
7. `| PRESERVEASPECTRATIO_XMIDYMID`
8. `| PRESERVEASPECTRATIO_XMAXYMID`
9. `| PRESERVEASPECTRATIO_XMINYMAX`
10. `| PRESERVEASPECTRATIO_XMIDYMAX`
11. `| PRESERVEASPECTRATIO_XMAXYMAX`

`type meetOrSliceType =`

1. `| MEETORSLICE_UNKNOWN`
2. `| MEETORSLICE_MEET`
3. `| MEETORSLICE_SLICE`

`type transformType =`

1. `| TRANSFORM_UNKNOWN`
2. `| TRANSFORM_MATRIX`
3. `| TRANSFORM_TRANSLATE`
4. `| TRANSFORM_SCALE`
5. `| TRANSFORM_ROTATE`
6. `| TRANSFORM_SKEWX`
7. `| TRANSFORM_SKEWY`

`type zoomAndPanType =`

1. `| ZOOMANDPAN_UNKNOWN`
2. `| ZOOMANDPAN_DISABLE`
3. `| ZOOMANDPAN_MAGNIFY`

`type lengthAdjust =`

1. `| LENGTHADJUST_UNKNOWN`
2. `| LENGTHADJUST_SPACING`
3. `| LENGTHADJUST_SPACINGANDGLYPHS`

`type unitType =`

1. `| UNIT_TYPE_UNKNOWN`
2. `| UNIT_TYPE_USERSPACEONUSE`
3. `| UNIT_TYPE_OBJECTBOUNDINGBOX`

`type intentType =`

1. `| RENDERING_INTENT_UNKNOWN`
2. `| RENDERING_INTENT_AUTO`
3. `| RENDERING_INTENT_PERCEPTUAL`
4. `| RENDERING_INTENT_RELATIVE_COLORIMETRIC`
5. `| RENDERING_INTENT_SATURATION`
6. `| RENDERING_INTENT_ABSOLUTE_COLORIMETRIC`

`type pathSegmentType =`

1. `| PATHSEG_UNKNOWN`
2. `| PATHSEG_CLOSEPATH`
3. `| PATHSEG_MOVETO_ABS`
4. `| PATHSEG_MOVETO_REL`
5. `| PATHSEG_LINETO_ABS`
6. `| PATHSEG_LINETO_REL`
7. `| PATHSEG_CURVETO_CUBIC_ABS`
8. `| PATHSEG_CURVETO_CUBIC_REL`
9. `| PATHSEG_CURVETO_QUADRATIC_ABS`
10. `| PATHSEG_CURVETO_QUADRATIC_REL`
11. `| PATHSEG_ARC_ABS`
12. `| PATHSEG_ARC_REL`
13. `| PATHSEG_LINETO_HORIZONTAL_ABS`
14. `| PATHSEG_LINETO_HORIZONTAL_REL`
15. `| PATHSEG_LINETO_VERTICAL_ABS`
16. `| PATHSEG_LINETO_VERTICAL_REL`
17. `| PATHSEG_CURVETO_CUBIC_SMOOTH_ABS`
18. `| PATHSEG_CURVETO_CUBIC_SMOOTH_REL`
19. `| PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS`
20. `| PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL`

`type textPathMethodType =`

1. `| TEXTPATH_METHODTYPE_UNKNOWN`
2. `| TEXTPATH_METHODTYPE_ALIGN`
3. `| TEXTPATH_METHODTYPE_STRETCH`

`type textPathSpacingType =`

1. `| TEXTPATH_SPACINGTYPE_UNKNOWN`
2. `| TEXTPATH_SPACINGTYPE_AUTO`
3. `| TEXTPATH_SPACINGTYPE_EXACT`

`type spreadMethodType =`

1. `| SPREADMETHOD_UNKNOWN`
2. `| SPREADMETHOD_PAD`
3. `| SPREADMETHOD_REFLECT`
4. `| SPREADMETHOD_REPEAT`

`type markerUnitType =`

1. `| SVG_MARKERUNITS_UNKNOWN`
2. `| SVG_MARKERUNITS_USERSPACEONUSE`
3. `| SVG_MARKERUNITS_STROKEWIDTH`

`type markerOrientType =`

1. `| SVG_MARKER_ORIENT_UNKNOWN`
2. `| SVG_MARKER_ORIENT_AUTO`
3. `| SVG_MARKER_ORIENT_ANGLE`

`type blendModeType =`

1. `| SVG_FEBLEND_MODE_UNKNOWN`
2. `| SVG_FEBLEND_MODE_NORMAL`
3. `| SVG_FEBLEND_MODE_MULTIPLY`
4. `| SVG_FEBLEND_MODE_SCREEN`
5. `| SVG_FEBLEND_MODE_DARKEN`
6. `| SVG_FEBLEND_MODE_LIGHTEN`

`type colorMatrixType =`

1. `| SVG_FECOLORMATRIX_TYPE_UNKNOWN`
2. `| SVG_FECOLORMATRIX_TYPE_MATRIX`
3. `| SVG_FECOLORMATRIX_TYPE_SATURATE`
4. `| SVG_FECOLORMATRIX_TYPE_HUEROTATE`
5. `| SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA`

`type componentTransferType =`

1. `| SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN`
2. `| SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY`
3. `| SVG_FECOMPONENTTRANSFER_TYPE_TABLE`
4. `| SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE`
5. `| SVG_FECOMPONENTTRANSFER_TYPE_LINEAR`
6. `| SVG_FECOMPONENTTRANSFER_TYPE_GAMMA`

`type compositeOperatorType =`

1. `| SVG_FECOMPOSITE_OPERATOR_UNKNOWN`
2. `| SVG_FECOMPOSITE_OPERATOR_OVER`
3. `| SVG_FECOMPOSITE_OPERATOR_IN`
4. `| SVG_FECOMPOSITE_OPERATOR_OUT`
5. `| SVG_FECOMPOSITE_OPERATOR_ATOP`
6. `| SVG_FECOMPOSITE_OPERATOR_XOR`
7. `| SVG_FECOMPOSITE_OPERATOR_ARITHMETIC`

`type edgeModeType =`

1. `| SVG_EDGEMODE_UNKNOWN`
2. `| SVG_EDGEMODE_DUPLICATE`
3. `| SVG_EDGEMODE_WRAP`
4. `| SVG_EDGEMODE_NONE`

`type channelSelectorType =`

1. `| SVG_CHANNEL_UNKNOWN`
2. `| SVG_CHANNEL_R`
3. `| SVG_CHANNEL_G`
4. `| SVG_CHANNEL_B`
5. `| SVG_CHANNEL_A`

`type morphologyOperatorType =`

1. `| SVG_MORPHOLOGY_OPERATOR_UNKNOWN`
2. `| SVG_MORPHOLOGY_OPERATOR_ERODE`
3. `| SVG_MORPHOLOGY_OPERATOR_DILATE`

`type turbulenceType =`

1. `| SVG_TURBULENCE_TYPE_UNKNOWN`
2. `| SVG_TURBULENCE_TYPE_FRACTALNOISE`
3. `| SVG_TURBULENCE_TYPE_TURBULENCE`

`type stitchType =`

1. `| SVG_STITCHTYPE_UNKNOWN`
2. `| SVG_STITCHTYPE_STITCH`
3. `| SVG_STITCHTYPE_NOSTITCH`

`type suspendHandleID`
`class type 'a animated = object ... end`
`class type 'a list = object ... end`

### Elements

`class type element = object ... end`
`class type animatedString = Js.js_string Js.t animated`
`class type animatedBoolean = bool Js.t animated`
`class type stringList = Js.js_string Js.t list`
`class type animatedEnumeration = int animated`
`class type animatedUnitType = unitType animated`
`class type animatedInteger = int animated`
`class type animatedNumber = Js.number_t animated`
`class type numberList = Js.number_t list`
`class type animatedNumberList = numberList Js.t animated`
`class type length = object ... end`
`class type animatedLength = length Js.t animated`
`class type lengthList = length Js.t list`
`class type animatedLengthList = lengthList Js.t animated`
`class type angle = object ... end`
`class type animatedAngle = angle Js.t animated`
`class type rgbColor = object ... end`
`class type color = object ... end`
`class type iccColor = object ... end`
`class type rect = object ... end`
`class type animatedRect = rect Js.t animated`
`class type stylable = object ... end`
`class type locatable = object ... end`
`class type transformable = object ... end`
`class type tests = object ... end`
`class type langSpace = object ... end`
`class type externalResourcesRequired = object ... end`
`class type graphicsElement = object ... end`
`class type geometryElement = object ... end`
`class type unknownElement = graphicsElement`
`class type fitToViewBox = object ... end`
`class type zoomAndPan = object ... end`
`class type viewSpec = object ... end`
`class type uriReference = object ... end`
`class type document = object ... end`
`class type svgElement = object ... end`
`class type gElement = object ... end`
`class type defsElement = object ... end`
`class type descElement = object ... end`
`class type titleElement = object ... end`
`class type symbolElement = object ... end`
`class type useElement = object ... end`
`class type elementInstance = object ... end`
`class type elementInstanceList = object ... end`
`class type imageElement = object ... end`
`class type switchElement = object ... end`
`class type styleElement = object ... end`
`class type cssStyleSheet = object ... end`
`class type point = object ... end`
`class type pointList = point Js.t list`
`class type matrix = object ... end`
`class type transform = object ... end`
`class type transformList = object ... end`
`class type animatedTransformList = transformList Js.t animated`
`class type preserveAspectRatio = object ... end`
`class type animatedPreserveAspectRatio = preserveAspectRatio Js.t animated`
`class type pathSeg = object ... end`
`class type pathSegClosePath = pathSeg`
`class type pathSegMoveto = object ... end`
`class type pathSegLineto = object ... end`
`class type pathSegCurvetoCubic = object ... end`
`class type pathSegCurvetoQuadratic = object ... end`
`class type pathSegArc = object ... end`
`class type pathSegLinetoHorizontal = object ... end`
`class type pathSegLinetoVertical = object ... end`
`class type pathSegCurvetoCubicSmooth = object ... end`
`class type pathSegCurvetoQuadraticSmooth = object ... end`
`class type pathSegList = pathSeg Js.t list`
`class type animatedPathData = object ... end`
`class type pathElement = object ... end`
`class type rectElement = object ... end`
`class type circleElement = object ... end`
`class type ellipseElement = object ... end`
`class type lineElement = object ... end`
`class type animatedPoints = object ... end`
`class type polyLineElement = object ... end`
`class type polygonElement = object ... end`
`class type textContentElement = object ... end`
`class type textPositioningElement = object ... end`
`class type textElement = object ... end`
`class type tspanElement = textPositioningElement`
`class type trefElement = object ... end`
`class type textPathElementMethod = textPathMethodType animated`
`class type textPathElementSpacing = textPathSpacingType animated`
`class type textPathElement = object ... end`
`class type altGlyphElement = object ... end`
`class type altGlyphDefElement = element`
`class type altGlyphItemElement = element`
`class type glyphRefElement = object ... end`
`class type animatedMarkerUnit = markerUnitType animated`
`class type animatedMarkerOrient = markerOrientType animated`
`class type markerElement = object ... end`
`class type animatedSpreadMethod = spreadMethodType animated`
`class type gradientElement = object ... end`
`class type linearGradientElement = object ... end`
`class type radialGradientElement = object ... end`
`class type stopElement = object ... end`
`class type patternElement = object ... end`
`class type clipPathElement = object ... end`
`class type maskElement = object ... end`
`class type filterElement = object ... end`
`class type filterPrimitiveStandardAttributes = object ... end`
`class type animatedBlendMode = blendModeType animated`
`class type animatedColorMatrixType = colorMatrixType animated`
`class type animatedComponentTransferType = componentTransferType animated`
`class type animatedCompositeOperator = compositeOperatorType animated`
`class type animatedEdgeMode = edgeModeType animated`
`class type animatedChannelSelector = channelSelectorType animated`
`class type animatedMorphologyOperator = morphologyOperatorType animated`
`class type animatedTurbulenceType = turbulenceType animated`
`class type animatedStitchType = stitchType animated`
`class type feBlendElement = object ... end`
`class type feColorMatrixElement = object ... end`
`class type feComponentTransferElement = object ... end`
`class type componentTransferFunctionElement = object ... end`
`class type feFuncRElement = componentTransferFunctionElement`
`class type feFuncGElement = componentTransferFunctionElement`
`class type feFuncBElement = componentTransferFunctionElement`
`class type feFuncAElement = componentTransferFunctionElement`
`class type feCompositeElement = object ... end`
`class type feConvolveMatrixElement = object ... end`
`class type feDiffuseLightingElement = object ... end`
`class type feDistantLightElement = object ... end`
`class type fePointLightElement = object ... end`
`class type feSpotLightElement = object ... end`
`class type feDisplacementMapElement = object ... end`
`class type feFloodElement = object ... end`
`class type feGaussianBlurElement = object ... end`
`class type feImageElement = object ... end`
`class type feMergeElement = object ... end`
`class type feMergeNodeElement = object ... end`
`class type feMorphologyElement = object ... end`
`class type feOffsetElement = object ... end`
`class type feSpecularLightingElement = object ... end`
`class type feTileElement = object ... end`
`class type feTurbulenceElement = object ... end`
`class type feDropShadowElement = object ... end`
`class type cursorElement = object ... end`
`class type aElement = object ... end`
`class type viewElement = object ... end`
`class type scriptElement = object ... end`
`class type animationElement = object ... end`
`class type animateElement = object ... end`
`class type setElement = animationElement`
`class type animateMotionElement = animationElement`
`class type mPathElement = object ... end`
`class type animateColorElement = object ... end`
`class type animateTransformElement = animationElement`
`class type fontElement = object ... end`
`class type glyphElement = object ... end`
`class type fontFaceElement = element`
`class type fontFaceSrcElement = element`
`class type fontFaceUriElement = element`
`class type fontFaceFormatElement = element`
`class type fontFaceNameElement = element`
`class type metadataElement = element`
`class type foreignObjectElement = object ... end`

### Helper functions for creating Svg elements

`val createElement : document Js.t -> string -> element Js.t`
`val createA : document Js.t -> aElement Js.t`
`val createAltGlyph : document Js.t -> altGlyphElement Js.t`
`val createAltGlyphDef : document Js.t -> altGlyphDefElement Js.t`
`val createAltGlyphItem : document Js.t -> altGlyphItemElement Js.t`
`val createAnimate : document Js.t -> animateElement Js.t`
`val createAnimateColor : document Js.t -> animateColorElement Js.t`
`val createAnimateMotion : document Js.t -> animateMotionElement Js.t`
`val createAnimateTransform : document Js.t -> animateTransformElement Js.t`
`val createCircle : document Js.t -> circleElement Js.t`
`val createClipPath : document Js.t -> clipPathElement Js.t`
`val createCursor : document Js.t -> cursorElement Js.t`
`val createDefs : document Js.t -> defsElement Js.t`
`val createDesc : document Js.t -> descElement Js.t`
`val createEllipse : document Js.t -> ellipseElement Js.t`
`val createFilter : document Js.t -> filterElement Js.t`
`val createFont : document Js.t -> fontElement Js.t`
`val createFontFace : document Js.t -> fontElement Js.t`
`val createFontFaceFormat : document Js.t -> fontElement Js.t`
`val createFontFaceName : document Js.t -> fontElement Js.t`
`val createFontFaceSrc : document Js.t -> fontElement Js.t`
`val createFontFaceUri : document Js.t -> fontElement Js.t`
`val createForeignObject : document Js.t -> foreignObjectElement Js.t`
`val createG : document Js.t -> gElement Js.t`
`val createGlyph : document Js.t -> glyphElement Js.t`
`val createGlyphRef : document Js.t -> glyphElement Js.t`
`val createhkern : document Js.t -> element Js.t`
`val createImage : document Js.t -> imageElement Js.t`
`val createLineElement : document Js.t -> lineElement Js.t`
`val createLinearElement : document Js.t -> linearGradientElement Js.t`
`val createMask : document Js.t -> maskElement Js.t`
`val createMetaData : document Js.t -> metadataElement Js.t`
`val createMissingGlyph : document Js.t -> glyphElement Js.t`
`val createMPath : document Js.t -> mPathElement Js.t`
`val createPath : document Js.t -> pathElement Js.t`
`val createPattern : document Js.t -> patternElement Js.t`
`val createPolygon : document Js.t -> polygonElement Js.t`
`val createPolyline : document Js.t -> polyLineElement Js.t`
`val createRadialgradient : document Js.t -> radialGradientElement Js.t`
`val createRect : document Js.t -> rectElement Js.t`
`val createScript : document Js.t -> scriptElement Js.t`
`val createSet : document Js.t -> setElement Js.t`
`val createStop : document Js.t -> stopElement Js.t`
`val createStyle : document Js.t -> styleElement Js.t`
`val createSvg : document Js.t -> svgElement Js.t`
`val createSwitch : document Js.t -> switchElement Js.t`
`val createSymbol : document Js.t -> symbolElement Js.t`
`val createTextElement : document Js.t -> textElement Js.t`
`val createTextpath : document Js.t -> textPathElement Js.t`
`val createTitle : document Js.t -> titleElement Js.t`
`val createTref : document Js.t -> trefElement Js.t`
`val createTspan : document Js.t -> tspanElement Js.t`
`val createUse : document Js.t -> useElement Js.t`
`val createView : document Js.t -> viewElement Js.t`
`val createvkern : document Js.t -> element Js.t`
`val createMarker : document Js.t -> markerElement Js.t`
`val createFeBlend : document Js.t -> feBlendElement Js.t`
`val createFeColorMatrix : document Js.t -> feColorMatrixElement Js.t`
`val createFeComponentTransfer : document Js.t -> feComponentTransferElement Js.t`
`val createFeFuncR : document Js.t -> feFuncRElement Js.t`
`val createFeFuncG : document Js.t -> feFuncGElement Js.t`
`val createFeFuncB : document Js.t -> feFuncBElement Js.t`
`val createFeFuncA : document Js.t -> feFuncAElement Js.t`
`val createFeComposite : document Js.t -> feCompositeElement Js.t`
`val createFeConvolveMatrix : document Js.t -> feConvolveMatrixElement Js.t`
`val createFeDiffuseLighting : document Js.t -> feDiffuseLightingElement Js.t`
`val createFeDistantLight : document Js.t -> feDistantLightElement Js.t`
`val createFePointLight : document Js.t -> fePointLightElement Js.t`
`val createFeSpotLight : document Js.t -> feSpotLightElement Js.t`
`val createFeDisplacementMap : document Js.t -> feDisplacementMapElement Js.t`
`val createFeFlood : document Js.t -> feFloodElement Js.t`
`val createFeGaussianBlur : document Js.t -> feGaussianBlurElement Js.t`
`val createFeImage : document Js.t -> feImageElement Js.t`
`val createFeMerge : document Js.t -> feMergeElement Js.t`
`val createFeMergeNode : document Js.t -> feMergeNodeElement Js.t`
`val createFeMorphology : document Js.t -> feMorphologyElement Js.t`
`val createFeOffset : document Js.t -> feOffsetElement Js.t`
`val createFeSpecularLighting : document Js.t -> feSpecularLightingElement Js.t`
`val createFeTile : document Js.t -> feTileElement Js.t`
`val createFeTurbulence : document Js.t -> feTurbulenceElement Js.t`
`val createFeDropShadow : document Js.t -> feDropShadowElement Js.t`
`val svg_element : element Js.t Js.constr`
`val document : document Js.t`

The current document

`val getElementById : string -> element Js.t`

`getElementById id` returns the element with the id `id` in the current document. It raises `Not_found` if there are no such element

`module CoerceTo : sig ... end`