667e548e5f
One of the motivations for using `setAttribute` in the first place was to support more efficient DOM updates in the `expandTextDivs` method, since performance of the `enhanceTextSelection` mode can be somewhat bad when there's a lot of `textDivs` on the page. With recent `TextLayer` changes/optimizations it's no longer necessary to store a complete `style`-string for every `textDiv`, and we can thus re-visit the `setAttribute` usage. Note that with the current code, in `appendText`, there's only *one* string per `textDiv` which avoids a bunch of temporary strings. While the changes in this patch means that there's now *three* strings per `textDiv` instead, the total length of these strings are now quite a bit shorter (42 characters to be exact). |
||
---|---|---|
.. | ||
annotation_layer.js | ||
api_compatibility.js | ||
api.js | ||
canvas.js | ||
content_disposition.js | ||
display_utils.js | ||
fetch_stream.js | ||
font_loader.js | ||
metadata.js | ||
network_utils.js | ||
network.js | ||
node_stream.js | ||
pattern_helper.js | ||
svg.js | ||
text_layer.js | ||
transport_stream.js | ||
webgl.js | ||
worker_options.js | ||
xml_parser.js |