Module Js_of_ocaml.Dom_svg
DOM SVG binding
This is a partial binding to the DOM SVG API.
val xmlns : Js.js_string Js.t
Types
class type svg_error = object ... end
exception
SVGError of svg_error
type lengthUnitType
=
|
LENGTHTYPE_UNKNOWN
|
LENGTHTYPE_NUMBER
|
LENGTHTYPE_PERCENTAGE
|
LENGTHTYPE_EMS
|
LENGTHTYPE_EXS
|
LENGTHTYPE_PX
|
LENGTHTYPE_CM
|
LENGTHTYPE_MM
|
LENGTHTYPE_IN
|
LENGTHTYPE_PT
|
LENGTHTYPE_PC
type angleUnitType
=
|
ANGLETYPE_UNKNOWN
|
ANGLETYPE_UNSPECIFIED
|
ANGLETYPE_DEG
|
ANGLETYPE_RAD
|
ANGLETYPE_GRAD
type colorType
=
|
COLORTYPE_UNKNOWN
|
COLORTYPE_RGBCOLOR
|
COLORTYPE_RGBCOLOR_ICCCOLOR
|
COLORTYPE_CURRENTCOLOR
type alignmentType
=
type meetOrSliceType
=
|
MEETORSLICE_UNKNOWN
|
MEETORSLICE_MEET
|
MEETORSLICE_SLICE
type transformType
=
|
TRANSFORM_UNKNOWN
|
TRANSFORM_MATRIX
|
TRANSFORM_TRANSLATE
|
TRANSFORM_SCALE
|
TRANSFORM_ROTATE
|
TRANSFORM_SKEWX
|
TRANSFORM_SKEWY
type zoomAndPanType
=
|
ZOOMANDPAN_UNKNOWN
|
ZOOMANDPAN_DISABLE
|
ZOOMANDPAN_MAGNIFY
type lengthAdjust
=
|
LENGTHADJUST_UNKNOWN
|
LENGTHADJUST_SPACING
|
LENGTHADJUST_SPACINGANDGLYPHS
type unitType
=
|
UNIT_TYPE_UNKNOWN
|
UNIT_TYPE_USERSPACEONUSE
|
UNIT_TYPE_OBJECTBOUNDINGBOX
type intentType
=
|
RENDERING_INTENT_UNKNOWN
|
RENDERING_INTENT_AUTO
|
RENDERING_INTENT_PERCEPTUAL
|
RENDERING_INTENT_RELATIVE_COLORIMETRIC
|
RENDERING_INTENT_SATURATION
|
RENDERING_INTENT_ABSOLUTE_COLORIMETRIC
type pathSegmentType
=
type textPathMethodType
=
|
TEXTPATH_METHODTYPE_UNKNOWN
|
TEXTPATH_METHODTYPE_ALIGN
|
TEXTPATH_METHODTYPE_STRETCH
type textPathSpacingType
=
|
TEXTPATH_SPACINGTYPE_UNKNOWN
|
TEXTPATH_SPACINGTYPE_AUTO
|
TEXTPATH_SPACINGTYPE_EXACT
type spreadMethodType
=
|
SPREADMETHOD_UNKNOWN
|
SPREADMETHOD_PAD
|
SPREADMETHOD_REFLECT
|
SPREADMETHOD_REPEAT
type suspendHandleID
class type 'a animated = object ... end
class type 'a list = object ... end
Elements
class type element = object ... end
and animatedBoolean = bool Js.t animated
and stringList = Js.js_string Js.t list
and animatedEnumeration = int animated
and animatedInteger = int animated
and animatedNumber = float animated
and numberList = Js.number Js.t list
and length = object ... end
and animatedLength = length Js.t animated
and lengthList = length Js.t list
and angle = object ... end
and animatedAngle = angle Js.t animated
and rgbColor = object ... end
and color = object ... end
and iccColor = object ... end
and rect = object ... end
and animatedRect = rect Js.t animated
and stylable = object ... end
and locatable = object ... end
and transformable = object ... end
and tests = object ... end
and langSpace = object ... end
and externalResourcesRequired = object ... end
and fitToViewBox = object ... end
and zoomAndPan = object ... end
and viewSpec = object ... end
and uriReference = object ... end
and document = object ... end
and svgElement = object ... end
and gElement = object ... end
and defsElement = object ... end
and descElement = object ... end
and titleElement = object ... end
and symbolElement = object ... end
and useElement = object ... end
and elementInstance = object ... end
and elementInstanceList = object ... end
and imageElement = object ... end
and switchElement = object ... end
and styleElement = object ... end
and point = object ... end
and matrix = object ... end
and transform = object ... end
and transformList = object ... end
and preserveAspectRatio = object ... end
and pathSeg = object ... end
and pathSegClosePath = pathSeg
and pathSegMoveto = object ... end
and pathSegLineto = object ... end
and pathSegCurvetoCubic = object ... end
and pathSegCurvetoQuadratic = object ... end
and pathSegArc = object ... end
and pathSegLinetoHorizontal = object ... end
and pathSegLinetoVertical = object ... end
and pathSegCurvetoCubicSmooth = object ... end
and pathSegCurvetoQuadraticSmooth = object ... end
and pathSegList = pathSeg Js.t list
and animatedPathData = object ... end
and pathElement = object ... end
and rectElement = object ... end
and circleElement = object ... end
and ellipseElement = object ... end
class type lineElement = object ... end
and animatedPoints = object ... end
and polyLineElement = object ... end
and polygonElement = object ... end
and textContentElement = object ... end
and textPositioningElement = object ... end
and textElement = object ... end
and trefElement = object ... end
and textPathElement = object ... end
and altGlyphElement = object ... end
and altGlyphDefElement = element
and altGlyphItemElement = element
and glyphRefElement = object ... end
and gradientElement = object ... end
and linearGradientElement = object ... end
and radialGradientElement = object ... end
and stopElement = object ... end
and patternElement = object ... end
and clipPathElement = object ... end
and maskElement = object ... end
and filterElement = object ... end
and cursorElement = object ... end
and aElement = object ... end
and viewElement = object ... end
and scriptElement = object ... end
and animationElement = object ... end
and animateElement = object ... end
and setElement = animationElement
and mPathElement = object ... end
and animateColorElement = object ... end
and fontElement = object ... end
and 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 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 idid
in the current document. It raisesNot_found
if there are no such element
module CoerceTo : sig ... end