The stylus on the MS Surface Pro is really good, especially in OneNote. For engineers and designers, it makes sketching diagrams and wireframes super simple.
On the other hand, OneNote is fairly limited in its online capabilities, and I can think of many other uses for a good stylus within web applications.
Is there way, or better yet an existing library, to replicate OneNote's stylus behavior (e.g. palm rejection, smoothing lines, erasing strokes, etc.) in JavaScript for use in a browser?
EDIT: To be clear, I mean more than just basic drawing on a , more like the inking features in MS Office, where you can draw freehand on top of document content without interfering with how you interact with the app, and the ink stays put when you scroll and zoom.
I envisage some kind of fullscreen transparent canvas that appears when a pen hover is detected, and hidden when the pen is removed to allow regular mouse input. The contents would be conveyed to some kind of SVG and displayed with position: relative; or something.
Would this new possible in raw HTML5, or am I looking at some kind of plugin?
The Pointer Events
draftspec provides the primitives you would need to write such a library, but unfortunately the Chrome team has voted against supporting it, and it remains to be seen whether it will become a sufficiently supported standard to be usable on public sites.