Skip to content

Instantly share code, notes, and snippets.

@MariusBongarts
Last active July 30, 2021 21:13
Show Gist options
  • Save MariusBongarts/74ac8b5bc76cceb497573012ed1c8824 to your computer and use it in GitHub Desktop.
Save MariusBongarts/74ac8b5bc76cceb497573012ed1c8824 to your computer and use it in GitHub Desktop.
MediumHiglighter - content.js
const mediumHighlighter = document.createElement("medium-highlighter");
document.body.appendChild(mediumHighlighter);
const setMarkerPosition = (markerPosition) =>
mediumHighlighter.setAttribute(
"markerPosition",
JSON.stringify(markerPosition)
);
setMarkerPosition({
left: 0,
top: 0,
display: "flex",
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment