Work around Edge issues with HTMLCollections.
This commit is contained in:
parent
c52e8e9ef8
commit
900daa3e56
@ -19,7 +19,15 @@ class Clone extends Post
|
||||
quote: $ '.postNum > a:nth-of-type(2)', info
|
||||
comment: $ '.postMessage', post
|
||||
quotelinks: []
|
||||
backlinks: info.getElementsByClassName 'backlink'
|
||||
|
||||
# XXX Edge invalidates HTMLCollections when an ancestor node is inserted into another node.
|
||||
if $.engine is 'edge'
|
||||
Object.defineProperty @nodes, 'backlinks',
|
||||
configurable: true
|
||||
enumerable: true
|
||||
get: -> info.getElementsByClassName 'backlink'
|
||||
else
|
||||
@nodes.backlinks = info.getElementsByClassName 'backlink'
|
||||
|
||||
# Remove inlined posts inside of this post.
|
||||
for inline in $$ '.inline', post
|
||||
|
||||
@ -40,7 +40,15 @@ class Post
|
||||
comment: $ '.postMessage', post
|
||||
links: []
|
||||
quotelinks: []
|
||||
backlinks: info.getElementsByClassName 'backlink'
|
||||
|
||||
# XXX Edge invalidates HTMLCollections when an ancestor node is inserted into another node.
|
||||
if $.engine is 'edge'
|
||||
Object.defineProperty @nodes, 'backlinks',
|
||||
configurable: true
|
||||
enumerable: true
|
||||
get: -> info.getElementsByClassName 'backlink'
|
||||
else
|
||||
@nodes.backlinks = info.getElementsByClassName 'backlink'
|
||||
|
||||
unless @isReply = $.hasClass post, 'reply'
|
||||
@thread.OP = @
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user